Update to Minecraft 1.8.7

This commit is contained in:
md_5
2015-06-05 20:57:48 +10:00
parent e8c64031b1
commit a6a57a96d0
5 changed files with 33 additions and 32 deletions

View File

@@ -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("");
}
}