diff options
author | md_5 <git@md-5.net> | 2015-06-05 20:57:48 +1000 |
---|---|---|
committer | md_5 <git@md-5.net> | 2015-06-05 20:57:48 +1000 |
commit | a6a57a96d02e57264d45120ce9f272c18c64407a (patch) | |
tree | 907d03fe45edc27226e8ea81f06f039b8f3c75fc /nms-patches/PlayerConnection.patch | |
parent | e8c64031b1e4e06a918594ab349fff7e39c789ce (diff) | |
download | craftbukkit-a6a57a96d02e57264d45120ce9f272c18c64407a.tar craftbukkit-a6a57a96d02e57264d45120ce9f272c18c64407a.tar.gz craftbukkit-a6a57a96d02e57264d45120ce9f272c18c64407a.tar.lz craftbukkit-a6a57a96d02e57264d45120ce9f272c18c64407a.tar.xz craftbukkit-a6a57a96d02e57264d45120ce9f272c18c64407a.zip |
Update to Minecraft 1.8.7
Diffstat (limited to 'nms-patches/PlayerConnection.patch')
-rw-r--r-- | nms-patches/PlayerConnection.patch | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/nms-patches/PlayerConnection.patch b/nms-patches/PlayerConnection.patch index 1b92fa7c..58337968 100644 --- a/nms-patches/PlayerConnection.patch +++ b/nms-patches/PlayerConnection.patch @@ -1330,7 +1330,7 @@ PlayerConnectionUtils.ensureMainThread(packetplayinupdatesign, this, this.player.u()); this.player.resetIdleTimer(); WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension); -@@ -847,14 +1751,29 @@ +@@ -847,14 +1751,30 @@ if (!tileentitysign.b() || tileentitysign.c() != this.player) { this.minecraftServer.warning("Player " + this.player.getName() + " just tried to change non-editable sign"); @@ -1346,22 +1346,23 @@ + int y = packetplayinupdatesign.a().getY(); + int z = packetplayinupdatesign.a().getZ(); + String[] lines = new String[4]; ++ for (int i = 0; i < aichatbasecomponent.length; ++i) { -- tileentitysign.lines[i] = new ChatComponentText(aichatbasecomponent[i].c()); -+ lines[i] = aichatbasecomponent[i].c(); -+ } +- tileentitysign.lines[i] = new ChatComponentText(EnumChatFormat.a(aichatbasecomponent[i].c())); ++ lines[i] = EnumChatFormat.a(aichatbasecomponent[i].c()); + } + SignChangeEvent event = new SignChangeEvent((org.bukkit.craftbukkit.block.CraftBlock) player.getWorld().getBlockAt(x, y, z), this.server.getPlayer(this.player), lines); + this.server.getPluginManager().callEvent(event); + + if (!event.isCancelled()) { + System.arraycopy(org.bukkit.craftbukkit.block.CraftSign.sanitizeLines(event.getLines()), 0, tileentitysign.lines, 0, 4); + tileentitysign.isEditable = false; - } ++ } + // CraftBukkit end tileentitysign.update(); worldserver.notify(blockposition); -@@ -877,11 +1796,27 @@ +@@ -877,11 +1797,27 @@ public void a(PacketPlayInAbilities packetplayinabilities) { PlayerConnectionUtils.ensureMainThread(packetplayinabilities, this, this.player.u()); @@ -1390,7 +1391,7 @@ ArrayList arraylist = Lists.newArrayList(); Iterator iterator = this.minecraftServer.tabCompleteCommand(this.player, packetplayintabcomplete.a(), packetplayintabcomplete.b()).iterator(); -@@ -921,13 +1856,16 @@ +@@ -921,13 +1857,16 @@ itemstack1 = this.player.inventory.getItemInHand(); if (itemstack1 != null) { if (itemstack.getItem() == Items.WRITABLE_BOOK && itemstack.getItem() == itemstack1.getItem()) { @@ -1407,7 +1408,7 @@ return; } finally { packetdataserializer.release(); -@@ -950,16 +1888,21 @@ +@@ -950,16 +1889,21 @@ itemstack1 = this.player.inventory.getItemInHand(); if (itemstack1 != null) { if (itemstack.getItem() == Items.WRITTEN_BOOK && itemstack1.getItem() == Items.WRITABLE_BOOK) { @@ -1429,7 +1430,7 @@ return; } finally { packetdataserializer.release(); -@@ -976,11 +1919,12 @@ +@@ -976,11 +1920,12 @@ } } catch (Exception exception2) { PlayerConnection.c.error("Couldn\'t select trade", exception2); @@ -1443,7 +1444,7 @@ packetdataserializer = packetplayincustompayload.b(); try { -@@ -1016,6 +1960,7 @@ +@@ -1016,6 +1961,7 @@ } } catch (Exception exception3) { PlayerConnection.c.error("Couldn\'t set command block", exception3); @@ -1451,7 +1452,7 @@ } finally { packetdataserializer.release(); } -@@ -1041,6 +1986,7 @@ +@@ -1041,6 +1987,7 @@ } } catch (Exception exception4) { PlayerConnection.c.error("Couldn\'t set beacon", exception4); @@ -1459,7 +1460,7 @@ } } } else if ("MC|ItemName".equals(packetplayincustompayload.a()) && this.player.activeContainer instanceof ContainerAnvil) { -@@ -1056,7 +2002,28 @@ +@@ -1056,7 +2003,28 @@ containeranvil.a(""); } } |