diff options
author | Thinkofname <thinkofdeath@spigotmc.org> | 2016-04-01 22:58:20 +0100 |
---|---|---|
committer | Thinkofname <thinkofdeath@spigotmc.org> | 2016-04-01 22:58:20 +0100 |
commit | 420afc57ef55c910cd7db4285ab6cdc83fc2ce39 (patch) | |
tree | 928694917e60ca86cca05bc9e30dd85feb30353f /nms-patches | |
parent | f92e01ba5cf46c123d0cd38b29321c78706257e0 (diff) | |
download | craftbukkit-420afc57ef55c910cd7db4285ab6cdc83fc2ce39.tar craftbukkit-420afc57ef55c910cd7db4285ab6cdc83fc2ce39.tar.gz craftbukkit-420afc57ef55c910cd7db4285ab6cdc83fc2ce39.tar.lz craftbukkit-420afc57ef55c910cd7db4285ab6cdc83fc2ce39.tar.xz craftbukkit-420afc57ef55c910cd7db4285ab6cdc83fc2ce39.zip |
Handle cases where Mojang uses an empty string for permission checks
Diffstat (limited to 'nms-patches')
-rw-r--r-- | nms-patches/EntityPlayer.patch | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/nms-patches/EntityPlayer.patch b/nms-patches/EntityPlayer.patch index 4ef2f376..ca39da4d 100644 --- a/nms-patches/EntityPlayer.patch +++ b/nms-patches/EntityPlayer.patch @@ -436,24 +436,23 @@ this.playerConnection.sendPacket(new PacketPlayOutCloseWindow(this.activeContainer.windowId)); this.s(); } -@@ -741,8 +917,17 @@ +@@ -741,7 +917,16 @@ public void triggerHealthUpdate() { this.lastHealthSent = -1.0E8F; + this.lastSentExp = -1; // CraftBukkit - Added to reset - } - ++ } ++ + // CraftBukkit start - Support multi-line messages + public void sendMessage(IChatBaseComponent[] ichatbasecomponent) { + for (IChatBaseComponent component : ichatbasecomponent) { + this.sendMessage(component); + } -+ } + } + // CraftBukkit end -+ + public void b(IChatBaseComponent ichatbasecomponent) { this.playerConnection.sendPacket(new PacketPlayOutChat(ichatbasecomponent)); - } @@ -802,6 +987,8 @@ } @@ -479,7 +478,7 @@ if ("seed".equals(s) && !this.server.aa()) { return true; } else if (!"tell".equals(s) && !"help".equals(s) && !"me".equals(s) && !"trigger".equals(s)) { -@@ -840,6 +1029,12 @@ +@@ -840,6 +1029,15 @@ } else { return true; } @@ -487,12 +486,15 @@ + if ("@".equals(s)) { + return getBukkitEntity().hasPermission("minecraft.command.selector"); + } ++ if ("".equals(s)) { ++ return getBukkitEntity().isOp(); ++ } + return true; + // CraftBukkit end } public String A() { -@@ -938,7 +1133,7 @@ +@@ -938,7 +1136,7 @@ } public IChatBaseComponent getPlayerListName() { @@ -501,7 +503,7 @@ } public void a(EnumHand enumhand) { -@@ -955,11 +1150,139 @@ +@@ -955,11 +1153,139 @@ } public void M() { |