Hey i dont know if this is the right place to post this, i barely post myself i try to get help from other topics first but they didnt really help me as im a beginner



Recently i moved onto eclipse from n++ and i cant get my game to play, it keeps saying cannot be resolved to a type (i know its something to do with the run buildup and not having imported classes) but heres the code



package server;

import java.io.IOException;
import java.net.InetSocketAddress;
import java.text.DecimalFormat;

import org.apache.mina.common.IoAcceptor;
import org.apache.mina.transport.socket.nio.SocketAccepto r;
import org.apache.mina.transport.socket.nio.SocketAccepto rConfig;

import server.event.EventManager;
import server.model.npcs.NPCHandler;
import server.model.players.PlayerHandler;
import server.model.players.Player;
import server.model.players.Client;
import server.model.players.PlayerSave;
import server.model.minigames.*;
import server.model.npcs.*;
import server.net.ConnectionHandler;
import server.net.ConnectionThrottleFilter;
import server.util.ShutDownHook;
import server.util.SimpleTimer;
import server.util.log.Logger;
import server.world.ItemHandler;
import server.world.ObjectHandler;
import server.world.ObjectManager;
import server.world.ShopHandler;
import server.world.map.VirtualWorld;
import server.world.ClanChatHandler;
import server.world.WorldMap;

/**
* Server.java


public class Server {


public static boolean sleeping;
public static final int cycleRate;
public static boolean UpdateServer = false;
public static long lastMassSave = System.currentTimeMillis();
private static IoAcceptor acceptor;
private static ConnectionHandler connectionHandler;
private static ConnectionThrottleFilter throttleFilter;
private static SimpleTimer engineTimer, debugTimer;
private static long cycleTime, cycles, totalCycleTime, sleepTime;
private static DecimalFormat debugPercentFormat;
public static boolean shutdownServer = false;
public static boolean shutdownClientHandler;
public static int serverlistenerPort;
public static ItemHandler itemHandler = new ItemHandler();
public static PlayerHandler playerHandler = new PlayerHandler();
public static NPCHandler npcHandler = new NPCHandler();
public static ShopHandler shopHandler = new ShopHandler();
public static ObjectHandler objectHandler = new ObjectHandler();
public static ObjectManager objectManager = new ObjectManager();
public static CastleWars castleWars = new CastleWars();
public static PestControl pestControl = new PestControl();
public static ClanChatHandler clanChat = new ClanChatHandler();
//public static FightCaves fightCaves = new FightCaves();
//public static WorldMap worldMap = new WorldMap();
//private static final WorkerThread engine = new WorkerThread();

static {
if(!Config.SERVER_DEBUG) {
serverlistenerPort = 43594;
} else {
serverlistenerPort = 43594;
}
cycleRate = 600;
shutdownServer = false;
engineTimer = new SimpleTimer();
debugTimer = new SimpleTimer();
sleepTime = 0;
debugPercentFormat = new DecimalFormat("0.0#%");
}
//height,absX,absY,toAbsX,toAbsY,type
/*public static final boolean checkPos(int height,int absX,int absY,int toAbsX,int toAbsY,int type)
{
return I.I(height,absX,absY,toAbsX,toAbsY,type);
}*/
public static void main(java.lang.String args[]) throws NullPointerException, IOException {
/**
* Starting Up Server
*/

System.setOut(new Logger(System.out));
System.setErr(new Logger(System.err));
System.out.println("Plugins Initialized.");

/**
* World Map Loader
*/
/*if(!Config.SERVER_DEBUG)
VirtualWorld.init();
WorldMap.loadWorldMap();*/


/**
* Accepting Connections
*/
acceptor = new SocketAcceptor();
connectionHandler = new ConnectionHandler();

SocketAcceptorConfig sac = new SocketAcceptorConfig();
sac.getSessionConfig().setTcpNoDelay(false);
sac.setReuseAddress(true);
sac.setBacklog(100);

throttleFilter = new ConnectionThrottleFilter(Config.CONNECTION_DELAY);
sac.getFilterChain().addFirst("throttleFilter", throttleFilter);
acceptor.bind(new InetSocketAddress(serverlistenerPort), connectionHandler, sac);

/**
* Initialise Handlers
*/
EventManager.initialize();
Connection.initialize();
//PlayerSaving.initialize();
//MysqlManager.createConnection();

/**
* Server Successfully Loaded
*/
System.out.println("Enkrona is online on port enkronaps.servegame.com:" + serverlistenerPort);
/**
* Main Server Tick
*/
try {
while (!Server.shutdownServer) {
if (sleepTime >= 0)
Thread.sleep(sleepTime);
else
Thread.sleep(600);
engineTimer.reset();
itemHandler.process();
playerHandler.process();
npcHandler.process();
shopHandler.process();
objectManager.process();
pestControl.process();
cycleTime = engineTimer.elapsed();
sleepTime = cycleRate - cycleTime;
totalCycleTime += cycleTime;
cycles++;
debug();
if (System.currentTimeMillis() - lastMassSave > 300000) {
for(Player p : PlayerHandler.players) {
if(p == null)
continue;
PlayerSave.saveGame((Client)p);
System.out.println("Saved game for " + p.playerName + ".");
lastMassSave = System.currentTimeMillis();
}

}
}
} catch (Exception ex) {
ex.printStackTrace();
System.out.println("A fatal exception has been thrown!");
for(Player p : PlayerHandler.players) {
if(p == null)
continue;
PlayerSave.saveGame((Client)p);
System.out.println("Saved game for " + p.playerName + ".");
}
}
acceptor = null;
connectionHandler = null;
sac = null;
System.exit(0);
}

public static void processAllPackets() {
for (int j = 0; j < playerHandler.players.length; j++) {
if (playerHandler.players[j] != null) {
while(playerHandler.players[j].processQueuedPackets());
}
}
}

public static boolean playerExecuted = false;
private static void debug() {
if (debugTimer.elapsed() > 360*1000 || playerExecuted) {
long averageCycleTime = totalCycleTime / cycles;
System.out.println("Average Cycle Time: " + averageCycleTime + "ms");
double engineLoad = ((double) averageCycleTime / (double) cycleRate);
System.out.println("Players online: " + PlayerHandler.playerCount+ ", engine load: "+ debugPercentFormat.format(engineLoad));
totalCycleTime = 0;
cycles = 0;
System.gc();
System.runFinalization();
debugTimer.reset();
playerExecuted = false;
}
}

public static long getSleepTimer() {
return sleepTime;
}

}



This is probably a easy fix for u guys so dont judge me im just trying to learn

(its a pi source i downloaded)




Player cannot be resolved to a type
PlayerHandler cannot be resolved to a variable
PlayerSave cannot be resolved
Client cannot be resolved to a type
IoAcceptor cannot be resolved to a type
ConnectionHandler cannot be resolved to a type

at Source.src.server.Server.main(Server.java:95)


is the error (ive looked at it but honestly i dont understand..)