3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-18 04:20:08 +01:00

Merge pull request #58 in SPIGOT/craftbukkit from ~DMCK2B/craftbukkit:bugfix/fixNoOPCheckOnCommandBlocks to master

* commit 'b9c3e3e8f0df87a9eeb41e5a56872892ad75c3a2':
  Swap out always-OP vanilla system for Bukkit OP checking in command blocks
Dieser Commit ist enthalten in:
Thinkofdeath 2014-12-15 11:07:32 +01:00
Commit f6bfbb9851

Datei anzeigen

@ -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) {