 -                this.field_71340_o.func_73667_a("difficulty", Integer.valueOf(0));
 -            } else if (this.field_71340_o.func_73669_a("difficulty", 1) > 3) {
 -                this.field_71340_o.func_73667_a("difficulty", Integer.valueOf(3));
-+            /*
-+            if (this.settings.getIntProperty("difficulty", 1) < 0) {
-+                this.settings.setProperty("difficulty", Integer.valueOf(0));
-+            } else if (this.settings.getIntProperty("difficulty", 1) > 3) {
-+                this.settings.setProperty("difficulty", Integer.valueOf(3));
-             }
-+            */
- 
+-            }
+-
 -            this.field_71338_p = this.field_71340_o.func_73670_a("generate-structures", true);
 -            int i = this.field_71340_o.func_73669_a("gamemode", WorldSettings.GameType.SURVIVAL.func_77148_a());
 -            this.field_71337_q = WorldSettings.func_77161_a(i);
 +            this.field_71338_p = true;
 +            this.field_71337_q = WorldSettings.GameType.ADVENTURE; //Nailed: set to ADVENTURE default
              field_155771_h.info("Default game type: " + this.field_71337_q);
-             InetAddress inetaddress = null;
+-            InetAddress inetaddress = null;
  
 -            if (this.func_71211_k().length() > 0) {
 -                inetaddress = InetAddress.getByName(this.func_71211_k());
-+            /*if (this.getServerHostname().length() > 0) {
-+                inetaddress = InetAddress.getByName(this.getServerHostname());
-             }
- 
+-            }
+-
 -            if (this.func_71215_F() < 0) {
 -                this.func_71208_b(this.field_71340_o.func_73669_a("server-port", 25565));
 -            }
-+            if (this.getServerPort() < 0) {
-+                this.setServerPort(this.settings.getIntProperty("server-port", 25565));
-+            }*/
- 
+-
              field_155771_h.info("Generating keypair");
              this.func_71253_a(CryptManager.func_75891_b());
 -            field_155771_h.info("Starting Minecraft server on " + (this.func_71211_k().length() == 0 ? "*" : this.func_71211_k()) + ":" + this.func_71215_F());
-+            //field_155771_h.info("Starting Minecraft server on " + (this.getServerHostname().length() == 0 ? "*" : this.getServerHostname()) + ":" + this.getServerPort());
  
 -            try {
 -                this.func_147137_ag().func_151265_a(inetaddress, this.func_71215_F());
-+            //Nailed: redirect this to our own network system
+-            } catch (IOException ioexception) {
+-                field_155771_h.warn("**** FAILED TO BIND TO PORT!");
+-                field_155771_h.warn("The exception was: {}", new Object[] {ioexception.toString()});
+-                field_155771_h.warn("Perhaps a server is already running on that port?");
+-                return false;
+-            }
 +            NailedNetworkManager.startEndpoints();
-+            /*try {
-+                this.func_147137_ag().addLanEndpoint(inetaddress, this.getServerPort());
-             } catch (IOException ioexception) {
-                 field_155771_h.warn("**** FAILED TO BIND TO PORT!");
-                 field_155771_h.warn("The exception was: {}", new Object[] {ioexception.toString()});
-                 field_155771_h.warn("Perhaps a server is already running on that port?");
-                 return false;
--            }
-+            }*/
  
              if (!this.func_71266_T()) {
                  field_155771_h.warn("**** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!");
-@@ -157,9 +152,10 @@
-                 field_155771_h.warn("To change this, set \"online-mode\" to \"true\" in the server.properties file.");
+                 field_155771_h.warn("The server will make no attempt to authenticate usernames. Beware.");
+                 field_155771_h.warn("While this makes the game possible to play without internet access, it also opens up the ability for hackers to connect with any username they choose.");
+-                field_155771_h.warn("To change this, set \"online-mode\" to \"true\" in the server.properties file.");
++                field_155771_h.warn("To change this, set \"online-mode\" to \"true\" in the settings.conf file.");
              }
  
 -            if (this.func_152368_aE()) {
 -                this.func_152358_ax().func_152658_c();
 -            }
-+            //Nailed: disable the yggdrasil converter. we don't need it
-+            //if (this.func_152368_aE()) {
-+            //    this.func_152358_ax().func_152658_c();
-+            //}
- 
+-
              if (!PreYggdrasilConverter.func_152714_a(this.field_71340_o)) {
                  return false;
-@@ -167,13 +163,14 @@
+             } else {
                  this.func_152361_a(new DedicatedPlayerList(this));
                  long j = System.nanoTime();
  
 -                if (this.func_71270_I() == null) {
 -                    this.func_71261_m(this.field_71340_o.func_73671_a("level-name", "world"));
-+                /*
-+                if (this.getFolderName() == null) {
-+                    this.setFolderName(this.settings.getStringProperty("level-name", "world"));
-                 }
- 
+-                }
+-
 -                String s = this.field_71340_o.func_73671_a("level-seed", "");
 -                String s1 = this.field_71340_o.func_73671_a("level-type", "DEFAULT");
 -                String s2 = this.field_71340_o.func_73671_a("generator-settings", "");
-+                String s = this.settings.getStringProperty("level-seed", "");
-+                String s1 = this.settings.getStringProperty("level-type", "DEFAULT");
-+                String s2 = this.settings.getStringProperty("generator-settings", "");
-                 long k = (new Random()).nextLong();
- 
-                 if (s.length() > 0) {
-@@ -188,22 +185,21 @@
-                     }
-                 }
- 
+-                long k = (new Random()).nextLong();
+-
+-                if (s.length() > 0) {
+-                    try {
+-                        long l = Long.parseLong(s);
+-
+-                        if (l != 0L) {
+-                            k = l;
+-                        }
+-                    } catch (NumberFormatException numberformatexception) {
+-                        k = (long)s.hashCode();
+-                    }
+-                }
+-
 -                WorldType worldtype = WorldType.func_77130_a(s1);
-+                WorldType worldtype = WorldType.parseWorldType(s1);
- 
-                 if (worldtype == null) {
+-
+-                if (worldtype == null) {
 -                    worldtype = WorldType.field_77137_b;
-+                    worldtype = WorldType.DEFAULT;
-                 }
-+                */
- 
+-                }
+-
                  this.func_147136_ar();
                  this.func_82356_Z();
                  this.func_110455_j();

     }
 
     public void func_70000_a(PlayerUsageSnooper p_70000_1_) {
@@ -346,11 +344,11 @@
     }
 
     public boolean func_82356_Z() {

 
     public DedicatedServer(File p_i1508_1_) {
         super(p_i1508_1_, Proxy.NO_PROXY);
@@ -69,141 +72,63 @@
     }
 
     protected boolean func_71197_b() throws IOException {
