Thread: [PI] java import's, i can't fix

Results 1 to 3 of 3
  1. #1 [PI] java import's, i can't fix 
    Donator
    Jonasingame's Avatar
    Join Date
    Jan 2013
    Posts
    197
    Thanks given
    7
    Thanks received
    1
    Rep Power
    11
    Hi,

    okayy here is my server.java class
    this are import i can't find in my server but it was already there.
    I marked everything in red what my IDE says whats wrong
    i hope someone could help me
    Rep++ thanks

    Code:
    package server;
    
    import java.io.IOException;
    import java.net.InetSocketAddress;
    import java.text.DecimalFormat;
    import java.util.concurrent.Executors;
    
    import org.jboss.netty.bootstrap.ServerBootstrap;
    import org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory;
    import org.jboss.netty.util.HashedWheelTimer;
    
    import server.net.PipelineFactory;
    
    import server.util.log.Logger;
    
    import server.event.CycleEventHandler;
    import server.event.Task;
    import server.event.TaskScheduler;
    import server.clip.region.ObjectDef;
    import server.clip.region.Region;
    import server.world.WalkingCheck;
    import server.model.players.PlayerSave;
    import server.model.players.packets.PJClans;
    import server.world.StillGraphicsManager;
    import server.world.PlayerManager;
    import server.model.objects.DoubleDoors;
    import server.model.npcs.NPCHandler;
    import server.model.players.PlayerHandler;
    import server.model.objects.Doors;
    import server.model.minigames.*;
    import server.world.ItemHandler;
    import server.world.ObjectHandler;
    import server.world.ObjectManager;
    import server.world.ShopHandler;
    import server.world.ClanChatHandler;
    
    /**
     * The main class needed to start the server.
     * @author Sanity
     * @author Graham
     * @author Blake
     * @author Ryan Lmctruck30
     * Revised by Shawn
     * Notes by Shawn
     */
    public class Server {
    	
    	
    	/**
    	 *Calls to manage the players on the server.
    	 */
    	public static PlayerManager playerManager = null;
    	private static StillGraphicsManager stillGraphicsManager = null;
    	
    	
    	/**
    	 * Sleep mode of the server.
    	 */
    	public static boolean sleeping;
    	
    	
    	/**
    	 * Calls the rate in which an event cycles. 
    	 */
    	public static final int cycleRate;
    	
    	
    	/**
    	 * Server updating.
    	 */
    	public static boolean UpdateServer = false;
    	
    	
    	/**
    	 * Calls in which the server was last saved.
    	 */
    	public static long lastMassSave = System.currentTimeMillis();
    	
    	
    	/**
    	 * Calls the usage of CycledEvents. 
    	 */
    	private static long cycleTime, cycles, totalCycleTime, sleepTime;
    	
    	
    	/**
    	 * Used for debugging the server.
    	 */
    	private static DecimalFormat debugPercentFormat;
    	
    	
    	/**
    	 * Forced shutdowns.
    	 */
    	public static boolean shutdownServer = false;		
    	public static boolean shutdownClientHandler;	
    	
    	
    	/**
    	 * Used to identify the server port.
    	 */
    	public static int serverlistenerPort;
    	
    	
    	/**
    	 * Calls the usage of player items.
    	 */
    	public static ItemHandler itemHandler = new ItemHandler();
    	
    	
    	/**
    	 * Handles logged in players.
    	 */
    	public static PlayerHandler playerHandler = new PlayerHandler();
    	
    	
    	/**
    	 * Handles global NPCs.
    	 */
        public static NPCHandler npcHandler = new NPCHandler();
        
        
        /**
         * Handles global shops.
         */
    	public static ShopHandler shopHandler = new ShopHandler();
    	
    	
    	/**
    	 * Handles global objects.
    	 */
    	public static ObjectHandler objectHandler = new ObjectHandler();
    	public static ObjectManager objectManager = new ObjectManager();
    	
    	
    	/**
    	 * Handles the castlewars minigame.
    	 */
    	public static CastleWars castleWars = new CastleWars();
    	
    	
    	/**
    	 * Handles the fightpits minigame.
    	 */
    	public static FightPits fightPits = new FightPits();
    	
    	
    	/**
    	 * Handles the pestcontrol minigame.
    	 */
    	public static PestControl pestControl = new PestControl();
    	
    	
    	/**
    	 * Handles the fightcaves minigames.
    	 */
    	public static FightCaves fightCaves = new FightCaves();
    	public static PJClans pJClans = new PJClans();
    	
    	
    	/**
    	 * Handles the clan chat.
    	 */
    	public static ClanChatHandler clanChat = new ClanChatHandler();
            
    	
    	/**
    	 * Handles the task scheduler.
    	 */
    	private static final TaskScheduler scheduler = new TaskScheduler();
    
    	
    	/**
    	 * Gets the task scheduler.
    	 */
    	public static TaskScheduler getTaskScheduler() {
    		return scheduler;
    	}
    	
    	static {
    		if(!Config.SERVER_DEBUG) {
    			serverlistenerPort = 43594;
    		} else {
    			serverlistenerPort = 43594;
    		}
    		cycleRate = 600;
    		shutdownServer = false;
    		sleepTime = 0;
    		debugPercentFormat = new DecimalFormat("0.0#%");
    	}
    	
    	
    	/**
    	 * Starts the server.
    	 */    
    	public static void main(java.lang.String args[]) throws NullPointerException, IOException {
    
    		long startTime = System.currentTimeMillis();
    		System.setOut(new Logger(System.out));
    		System.setErr(new Logger(System.err));
    		ObjectDef.loadConfig();
    		Region.load();
    		WalkingCheck.load();
    		System.out.println("Developer: Ardi Rizal");
    		System.out.println("Launching Old School Project");
    		System.out.println("NPC Drops Loaded");
    		System.out.println("NPC Spawns Loaded");
    		System.out.println("Shops Loaded");
    		System.out.println("Object Spawns Loaded");
    	
    		//bind();
                    
                    
    		playerManager = PlayerManager.getSingleton();
    		playerManager.setupRegionPlayers();
    		stillGraphicsManager = new StillGraphicsManager();
    
    		
    	
    		Doors.getSingleton().load();
    		DoubleDoors.getSingleton().load();
    		pJClans.initialize();
    		Connection.initialize();
    
    		
    		/**
    		 *Successfully loaded the server.
    		 */
                    long endTime = System.currentTimeMillis();
                    long elapsed = endTime-startTime;
                    System.out.println("Server started up in "+elapsed+" ms");
    		System.out.println("Server listening on port 127.0.0.1:" + serverlistenerPort);
    		
                    
                    
            /**
    		 * Main server tick.
    		 */
    		scheduler.schedule(new Task() {
    			@Override
                        protected void execute() {
                            itemHandler.process();
                            playerHandler.process();	
                            npcHandler.process();
                            shopHandler.process();
                            CycleEventHandler.getSingleton().process();
                            objectManager.process();
                            fightPits.process();
                            pestControl.process();
    						pJClans.process();
                            }
                    });
    		
    	}
    	
    	/**
    	 * Logging execution.
    	 */
    	public static boolean playerExecuted = false;
    	
    	
    	/**
    	 * Gets the sleep mode timer and puts the server into sleep mode.
    	 */
    	public static long getSleepTimer() {
    		return sleepTime;
    	}
    	
    	
    	/**
    	 * Gets the Graphics manager.
    	 */
    	public static StillGraphicsManager getStillGraphicsManager() {
    		return stillGraphicsManager;
    	}
    	
    	
    	/**
    	 * Gets the Player manager.
    	 */
    	public static PlayerManager getPlayerManager() {
    		return playerManager;
    	}
    	
    	
    	/**
    	 * Gets the Object manager.
    	 */
    	public static ObjectManager getObjectManager() {
    		return objectManager;
    	}
    	
    	
    /**
     * Java connection.
     * Ports.
     */
            private static void bind() {
                ServerBootstrap serverBootstrap = new ServerBootstrap (new NioServerSocketChannelFactory(Executors.newCachedThreadPool(), Executors.newCachedThreadPool()));
                serverBootstrap.setPipelineFactory (new PipelineFactory(new HashedWheelTimer()));
                serverBootstrap.bind (new InetSocketAddress(serverlistenerPort));	
            }
    	
    }
    Reply With Quote  
     

  2. #2  
    Registered Member
    hacker's Avatar
    Join Date
    Jun 2013
    Posts
    1,409
    Thanks given
    576
    Thanks received
    580
    Rep Power
    5000
    Um u have to add netty.jar to ur library for eclipse so um click source fodler then click Project on the top of eclipse and properties and um Java build path then click libraries and add Netty.jar in
    EDIT: In case u dont have netty.jar Download jar @ UppIT
    just add to lib or deps folder
    Attached image
    Reply With Quote  
     

  3. Thankful user:


  4. #3  
    Donator
    Jonasingame's Avatar
    Join Date
    Jan 2013
    Posts
    197
    Thanks given
    7
    Thanks received
    1
    Rep Power
    11
    Quote Originally Posted by Hacker View Post
    Um u have to add netty.jar to ur library for eclipse so um click source fodler then click Project on the top of eclipse and properties and um Java build path then click libraries and add Netty.jar in
    EDIT: In case u dont have netty.jar Download jar @ UppIT
    just add to lib or deps folder
    fixed thanks
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Can someone fix my Java for Mac?
    By skills102 in forum Software
    Replies: 0
    Last Post: 08-06-2012, 05:18 PM
  2. Economy can be fixed, you can help!
    By Easter in forum Media
    Replies: 1
    Last Post: 03-01-2009, 07:55 PM
  3. how can i fix this? giving rep++
    By Darkie in forum Help
    Replies: 0
    Last Post: 02-24-2009, 05:48 PM
  4. How can I fix this...?
    By Josh™ in forum Help
    Replies: 6
    Last Post: 01-31-2009, 01:17 PM
  5. Error errr, can't fix?
    By m0n3ym5k3r in forum Help
    Replies: 1
    Last Post: 11-03-2008, 02:25 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •