Exemplo n.º 1
0
 public void shutdown() {
   if (finishedShutdown) {
     return;
   }
   System.out.println("Shutting down login...");
   instances.remove(PORT);
   init.close();
   finishedShutdown = true; // nothing. lol
 }
Exemplo n.º 2
0
  public void run_startup_configurations() {
    System.out.println("Loading Login Server:");
    userLimit = ServerConfig.userLimit;
    serverName = ServerConfig.serverName;
    eventMessage = ServerConfig.eventMessage;
    flag = ServerConfig.flag;
    adminOnly = ServerConfig.adminOnly;
    maxCharacters = ServerConfig.maxCharacters;

    try {
      init = new ServerConnection(PORT); // could code world here to seperate them
      init.run();
    } catch (final Exception e) {
      System.out.println("Login Server binding failed!");
      System.err.println("Could not bind to port " + PORT + ".");
      throw new RuntimeException("Binding failed.", e);
    }
  }