Package mcserver

Source Code of mcserver.Main

package mcserver;

import packets.Dispatcher;
import world.WorldState;
import worldmap.MapColumn;
import network.NewConnectionListener;

public class Main {
  public static void main(String args[]) {   
    System.out.println("Starting the server :)");
   
    System.out.println("Loading the world...");
    WorldState world = new WorldState();
    Dispatcher worldDispatcher = new Dispatcher(world);
   
   
    NewConnectionListener server = new NewConnectionListener(worldDispatcher, "localhost", 25565, 1);
    new Thread(server).start();
   
    while(true) {
      try {
        Thread.sleep(5000);
      } catch (InterruptedException e) {
        System.out.println("Server loop got interrupted!");
        break;
      }
    }
   
    System.out.println("Exiting server");
  }
}
TOP

Related Classes of mcserver.Main

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.