<commit_before>--- ../src_base/minecraft_server/net/minecraft/src/ConsoleCommandHandler.java	0000-00-00 00:00:00.000000000 -0000
+++ ../src_work/minecraft_server/net/minecraft/src/ConsoleCommandHandler.java	0000-00-00 00:00:00.000000000 -0000
@@ -4,6 +4,8 @@
 import java.util.Set;
 import java.util.logging.Logger;
 import net.minecraft.server.MinecraftServer;
+import net.minecraft.src.forge.DimensionManager;
+import net.minecraft.src.forge.ForgeHooks;
 
 public class ConsoleCommandHandler
 {
@@ -55,9 +57,9 @@
                         var8.savePlayerStates();
                     }
 
-                    for (var9 = 0; var9 < this.minecraftServer.worldMngr.length; ++var9)
+                    for (World world : DimensionManager.getWorlds())
                     {
-                        var10 = this.minecraftServer.worldMngr[var9];
+                        var10 = (WorldServer)world;
                         boolean var11 = var10.levelSaving;
                         var10.levelSaving = false;
                         var10.saveWorld(true, (IProgressUpdate)null);
@@ -70,20 +72,18 @@
                 {
                     this.sendNoticeToOps(var7, "Disabling level saving..");
 
-                    for (var9 = 0; var9 < this.minecraftServer.worldMngr.length; ++var9)
+                    for (World world : DimensionManager.getWorlds())
                     {
-                        var10 = this.minecraftServer.worldMngr[var9];
-                        var10.levelSaving = true;
+                        ((WorldServer)world).levelSaving = true;
                     }
                 }
                 else if (var4.equalsIgnoreCase("save-on"))
                 {
                     this.sendNoticeToOps(var7, "Enabling level saving..");
 
-                    for (var9 = 0; var9 < this.minecraftServer.worldMngr.length; ++var9)
+                    for (World world : DimensionManager.getWorlds())
                     {
-                        var10 = this.minecraftServer.worldMngr[var9];
-                        var10.levelSaving = false;
+                        ((WorldServer)world).levelSaving = false;
                     }
                 }
                 else if (var4.equalsIgnoreCase("op"))
@@ -330,20 +330,18 @@
 
                                 if ("add".equalsIgnoreCase(var19))
                                 {
-                                    for (var21 = 0; var21 < this.minecraftServer.worldMngr.length; ++var21)
+                                    for (World world : DimensionManager.getWorlds())
                                     {
-                                        var24 = this.minecraftServer.worldMngr[var21];
-                                        var24.advanceTime(var24.getWorldTime() + (long)var23);
+                                        world.advanceTime(world.getWorldTime() + (long)var23);
                                     }
 
                                     this.sendNoticeToOps(var7, "Added " + var23 + " to time");
                                 }
                                 else if ("set".equalsIgnoreCase(var19))
                                 {
-                                    for (var21 = 0; var21 < this.minecraftServer.worldMngr.length; ++var21)
+                                    for (World world : DimensionManager.getWorlds())
                                     {
-                                        var24 = this.minecraftServer.worldMngr[var21];
-                                        var24.advanceTime((long)var23);
+                                        world.advanceTime((long)var23);
                                     }
 
                                     this.sendNoticeToOps(var7, "Set time to " + var23);
@@ -360,8 +358,12 @@
                         }
                         else if (var4.equalsIgnoreCase("say") && var5.length() > 0)
                         {
-                            minecraftLogger.info("[" + var7 + "] " + var5);
-                            var8.sendPacketToAllPlayers(new Packet3Chat("\u00a7d[Server] " + var5));
+                            var5 = ForgeHooks.onServerCommandSay(var6, var6.getUsername(), var5);
+                            if (var5 != null)
+                            {
+                                minecraftLogger.info("[" + var7 + "] " + var5);
+                                var8.sendPacketToAllPlayers(new Packet3Chat("\u00a7d[Server] " + var5));
+                            }
                         }
                         else if (var4.equalsIgnoreCase("tell"))
                         {
@@ -385,7 +387,7 @@
                         }
                         else if (var4.equalsIgnoreCase("toggledownfall"))
                         {
-                            this.minecraftServer.worldMngr[0].commandToggleDownfall();
+                            ((WorldServer)DimensionManager.getWorld(0)).commandToggleDownfall();
                             var6.log("Toggling rain and snow, hold on...");
                         }
                         else if (var4.equalsIgnoreCase("banlist"))
@@ -402,6 +404,10 @@
                                 var6.log("Ban list:" + this.func_40648_a(this.minecraftServer.getBannedPlayersList(), ", "));
                             }
                         }
+                        else if (ForgeHooks.onServerCommand(var6, var6.getUsername(), var2))
+                        {
+                            //Nom Nom Nom, Do we need to log anything, Let the command handle it themselves.
+                        }
                         else
                         {
                             minecraftLogger.info("Unknown console command. Type \"help\" for help.");<commit_msg>Updated patch for mapings<commit_after>--- ../src_base/minecraft_server/net/minecraft/src/ConsoleCommandHandler.java	0000-00-00 00:00:00.000000000 -0000
+++ ../src_work/minecraft_server/net/minecraft/src/ConsoleCommandHandler.java	0000-00-00 00:00:00.000000000 -0000
@@ -4,6 +4,8 @@
 import java.util.Set;
 import java.util.logging.Logger;
 import net.minecraft.server.MinecraftServer;
+import net.minecraft.src.forge.DimensionManager;
+import net.minecraft.src.forge.ForgeHooks;
 
 public class ConsoleCommandHandler
 {
@@ -55,9 +57,9 @@
                         var8.savePlayerStates();
                     }
 
-                    for (var9 = 0; var9 < this.minecraftServer.worldMngr.length; ++var9)
+                    for (World world : DimensionManager.getWorlds())
                     {
-                        var10 = this.minecraftServer.worldMngr[var9];
+                        var10 = (WorldServer)world;
                         boolean var11 = var10.levelSaving;
                         var10.levelSaving = false;
                         var10.saveWorld(true, (IProgressUpdate)null);
@@ -70,20 +72,18 @@
                 {
                     this.sendNoticeToOps(var7, "Disabling level saving..");
 
-                    for (var9 = 0; var9 < this.minecraftServer.worldMngr.length; ++var9)
+                    for (World world : DimensionManager.getWorlds())
                     {
-                        var10 = this.minecraftServer.worldMngr[var9];
-                        var10.levelSaving = true;
+                        ((WorldServer)world).levelSaving = true;
                     }
                 }
                 else if (var4.equalsIgnoreCase("save-on"))
                 {
                     this.sendNoticeToOps(var7, "Enabling level saving..");
 
-                    for (var9 = 0; var9 < this.minecraftServer.worldMngr.length; ++var9)
+                    for (World world : DimensionManager.getWorlds())
                     {
-                        var10 = this.minecraftServer.worldMngr[var9];
-                        var10.levelSaving = false;
+                        ((WorldServer)world).levelSaving = false;
                     }
                 }
                 else if (var4.equalsIgnoreCase("op"))
@@ -330,20 +330,18 @@
 
                                 if ("add".equalsIgnoreCase(var19))
                                 {
-                                    for (var21 = 0; var21 < this.minecraftServer.worldMngr.length; ++var21)
+                                    for (World world : DimensionManager.getWorlds())
                                     {
-                                        var24 = this.minecraftServer.worldMngr[var21];
-                                        var24.advanceTime(var24.getWorldTime() + (long)var23);
+                                        world.advanceTime(world.getWorldTime() + (long)var23);
                                     }
 
                                     this.sendNoticeToOps(var7, "Added " + var23 + " to time");
                                 }
                                 else if ("set".equalsIgnoreCase(var19))
                                 {
-                                    for (var21 = 0; var21 < this.minecraftServer.worldMngr.length; ++var21)
+                                    for (World world : DimensionManager.getWorlds())
                                     {
-                                        var24 = this.minecraftServer.worldMngr[var21];
-                                        var24.advanceTime((long)var23);
+                                        world.advanceTime((long)var23);
                                     }
 
                                     this.sendNoticeToOps(var7, "Set time to " + var23);
@@ -360,8 +358,12 @@
                         }
                         else if (var4.equalsIgnoreCase("say") && var5.length() > 0)
                         {
-                            minecraftLogger.info("[" + var7 + "] " + var5);
-                            var8.sendPacketToAllPlayers(new Packet3Chat("\u00a7d[Server] " + var5));
+                            var5 = ForgeHooks.onServerCommandSay(var6, var6.getUsername(), var5);
+                            if (var5 != null)
+                            {
+                                minecraftLogger.info("[" + var7 + "] " + var5);
+                                var8.sendPacketToAllPlayers(new Packet3Chat("\u00a7d[Server] " + var5));
+                            }
                         }
                         else if (var4.equalsIgnoreCase("tell"))
                         {
@@ -385,7 +387,7 @@
                         }
                         else if (var4.equalsIgnoreCase("toggledownfall"))
                         {
-                            this.minecraftServer.worldMngr[0].commandToggleDownfall();
+                            ((WorldServer)DimensionManager.getWorld(0)).commandToggleDownfall();
                             var6.log("Toggling rain and snow, hold on...");
                         }
                         else if (var4.equalsIgnoreCase("banlist"))
@@ -402,6 +404,10 @@
                                 var6.log("Ban list:" + this.joinStrings(this.minecraftServer.getBannedPlayersList(), ", "));
                             }
                         }
+                        else if (ForgeHooks.onServerCommand(var6, var6.getUsername(), var2))
+                        {
+                            //Nom Nom Nom, Do we need to log anything, Let the command handle it themselves.
+                        }
                         else
                         {
                             minecraftLogger.info("Unknown console command. Type \"help\" for help.");
{'fraction_non_alphanumeric': 0.10681719496309162, 'fraction_numerical': 0.04003473729917499, 'mean_word_length': 1.0440184593539226, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 4, 'word_list_counts': {'cursed_substrings.json': 38, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6892714', 'n_tokens_mistral': 3144, 'n_tokens_neox': 2774, 'n_words': 444}