Files
CatServer/patches/net/minecraft/command/ServerCommandManager.java.patch
2018-09-06 06:06:49 +08:00

37 lines
1.5 KiB
Diff

--- ../src-base/minecraft/net/minecraft/command/ServerCommandManager.java
+++ ../src-work/minecraft/net/minecraft/command/ServerCommandManager.java
@@ -38,9 +38,14 @@
{
private final MinecraftServer server;
+ // Cauldron start - moved commands to it's own method to be executed further in server startup + changed to registerVanillaCommand
public ServerCommandManager(MinecraftServer serverIn)
{
this.server = serverIn;
+ }
+
+ public void registerVanillaCommands()
+ {
this.registerCommand(new CommandTime());
this.registerCommand(new CommandGameMode());
this.registerCommand(new CommandDifficulty());
@@ -86,8 +91,7 @@
this.registerCommand(new CommandTitle());
this.registerCommand(new CommandEntityData());
this.registerCommand(new CommandStopSound());
-
- if (serverIn.isDedicatedServer())
+ if (this.server.isDedicatedServer())
{
this.registerCommand(new CommandOp());
this.registerCommand(new CommandDeOp());
@@ -144,7 +148,7 @@
}
}
- if (sender != minecraftserver && minecraftserver.worldServers[0].getGameRules().getBoolean("logAdminCommands"))
+ if (sender != minecraftserver && minecraftserver.worldServers[0].getGameRules().getBoolean("logAdminCommands") && !org.spigotmc.SpigotConfig.silentCommandBlocks) // Spigot
{
minecraftserver.addChatMessage(itextcomponent);
}