diff options
Diffstat (limited to 'patches/server/0972-Brigadier-based-command-API.patch')
-rw-r--r-- | patches/server/0972-Brigadier-based-command-API.patch | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/patches/server/0972-Brigadier-based-command-API.patch b/patches/server/0972-Brigadier-based-command-API.patch index f139f76f3a..e0b22efdba 100644 --- a/patches/server/0972-Brigadier-based-command-API.patch +++ b/patches/server/0972-Brigadier-based-command-API.patch @@ -2316,10 +2316,10 @@ index ec29e95d796305b8d44c2075629a8147a05f48c1..9cd4f7c6910727c849ac7f5d675dc610 public void tick() { diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java -index b4af03c4bdd1ce0861f36c3b75fc7e89d701c46a..0761d5bc5f2813bb4a9f664ac7a05b9744d0a778 100644 +index 1c94b78cb23e44762fc99bb916484c1b334b6b10..7db17eabd88d9b8d2cc9b5c870c1980357e33f32 100644 --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java -@@ -237,7 +237,6 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface +@@ -235,7 +235,6 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface io.papermc.paper.command.PaperCommands.registerCommands(this); // Paper - setup /paper command com.destroystokyo.paper.Metrics.PaperMetrics.startMetrics(); // Paper - start metrics com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // Paper - load version history now @@ -2328,17 +2328,16 @@ index b4af03c4bdd1ce0861f36c3b75fc7e89d701c46a..0761d5bc5f2813bb4a9f664ac7a05b97 this.setPvpAllowed(dedicatedserverproperties.pvp); this.setFlightAllowed(dedicatedserverproperties.allowFlight); diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 134f31cce8d8eca669948a784e2766216fb91ab5..60c65af218d533d53b765ba2175fed163c32c126 100644 +index 0b60898c8239c4518025d1b37689ae2d02d68e3c..60c65af218d533d53b765ba2175fed163c32c126 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2408,33 +2408,20 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -2408,29 +2408,20 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl } } + @Deprecated // Paper public void handleCommand(String s) { // Paper - private -> public - org.spigotmc.AsyncCatcher.catchOp("Command Dispatched Async: " + s); // Paper - Add async catcher -- co.aikar.timings.MinecraftTimings.playerCommandTimer.startTiming(); // Paper - if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot - this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s); - @@ -2348,7 +2347,6 @@ index 134f31cce8d8eca669948a784e2766216fb91ab5..60c65af218d533d53b765ba2175fed16 - this.cserver.getPluginManager().callEvent(event); - - if (event.isCancelled()) { -- co.aikar.timings.MinecraftTimings.playerCommandTimer.stopTiming(); // Paper - return; - } - @@ -2360,8 +2358,6 @@ index 134f31cce8d8eca669948a784e2766216fb91ab5..60c65af218d533d53b765ba2175fed16 - player.sendMessage(org.bukkit.ChatColor.RED + "An internal error occurred while attempting to perform this command"); - java.util.logging.Logger.getLogger(ServerGamePacketListenerImpl.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); - return; -- } finally { -- co.aikar.timings.MinecraftTimings.playerCommandTimer.stopTiming(); // Paper + // Paper start - Remove all this old duplicated logic + if (s.startsWith("/")) { + s = s.substring(1); |