From b9c3e3e8f0df87a9eeb41e5a56872892ad75c3a2 Mon Sep 17 00:00:00 2001 From: Suddenly Date: Mon, 15 Dec 2014 10:04:42 +0000 Subject: [PATCH] Swap out always-OP vanilla system for Bukkit OP checking in command blocks --- nms-patches/PlayerConnection.patch | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/nms-patches/PlayerConnection.patch b/nms-patches/PlayerConnection.patch index 841ff5720b..19d548ef94 100644 --- a/nms-patches/PlayerConnection.patch +++ b/nms-patches/PlayerConnection.patch @@ -1,5 +1,5 @@ ---- ../work/decompile-8eb82bde//net/minecraft/server/PlayerConnection.java 2014-12-09 12:20:29.531617451 +0000 -+++ src/main/java/net/minecraft/server/PlayerConnection.java 2014-12-09 12:20:21.823617622 +0000 +--- ../work/decompile-8eb82bde//net/minecraft/server/PlayerConnection.java Mon Dec 15 10:02:18 2014 ++++ src/main/java/net/minecraft/server/PlayerConnection.java Mon Dec 15 10:02:18 2014 @@ -16,6 +16,48 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -1420,7 +1420,7 @@ return; } finally { packetdataserializer.release(); -@@ -946,6 +1896,7 @@ +@@ -946,11 +1896,12 @@ } } catch (Exception exception2) { PlayerConnection.c.error("Couldn\'t select trade", exception2); @@ -1428,6 +1428,12 @@ } } else if ("MC|AdvCdm".equals(packetplayincustompayload.a())) { if (!this.minecraftServer.getEnableCommandBlock()) { + this.player.sendMessage(new ChatMessage("advMode.notEnabled", new Object[0])); +- } else if (this.player.a(2, "") && this.player.abilities.canInstantlyBuild) { ++ } else if (this.player.getBukkitEntity().isOp() && this.player.abilities.canInstantlyBuild) { // CraftBukkit - Change to Bukkit OP versus Vanilla OP + packetdataserializer = packetplayincustompayload.b(); + + try { @@ -986,6 +1937,7 @@ } } catch (Exception exception3) {