      }
  
      /**
-@@ -1125,6 +1117,7 @@
+@@ -1125,6 +1122,7 @@
  
              if (var2 != null)
              {

         this.setDifficultyForAllWorlds(this.getDifficulty());
         this.initialWorldChunkLoad();
     }
@@ -431,7 +411,9 @@
             for (int var1 = 0; var1 < this.worldServers.length; ++var1)
             {
                 WorldServer var2 = this.worldServers[var1];
+                MinecraftForge.EVENT_BUS.post(new WorldEvent.Unload(var2));
                 var2.flush();
+                DimensionManager.setWorld(var2.provider.dimensionId, null);
             }
 
             if (this.usageSnooper != null && this.usageSnooper.isSnooperRunning())
@@ -645,13 +627,15 @@
         this.theProfiler.startSection("levels");
         int var1;
 

         this.theProfiler.endStartSection("connection");
         this.getNetworkThread().networkTick();
         this.theProfiler.endStartSection("players");
@@ -754,7 +745,13 @@
      */
     public WorldServer worldServerForDimension(int par1)
     {
