summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukBukkit <luk.bukkit@gmail.com>2016-11-19 12:40:42 +0100
committermd_5 <git@md-5.net>2016-11-20 09:33:22 +1100
commit221508dce3904cf52a65aaf1e58a2ac3a4089080 (patch)
treea4f43e730f3b79626d1b453052a856087c566807
parenteed13ca548cc6e300e59c076f457c46097ca97de (diff)
downloadcraftbukkit-221508dce3904cf52a65aaf1e58a2ac3a4089080.tar
craftbukkit-221508dce3904cf52a65aaf1e58a2ac3a4089080.tar.gz
craftbukkit-221508dce3904cf52a65aaf1e58a2ac3a4089080.tar.lz
craftbukkit-221508dce3904cf52a65aaf1e58a2ac3a4089080.tar.xz
craftbukkit-221508dce3904cf52a65aaf1e58a2ac3a4089080.zip
Fix cancelling PlayerEditBookEvent
-rw-r--r--nms-patches/PlayerConnection.patch16
1 files changed, 8 insertions, 8 deletions
diff --git a/nms-patches/PlayerConnection.patch b/nms-patches/PlayerConnection.patch
index d52bdf5d..ad338f9a 100644
--- a/nms-patches/PlayerConnection.patch
+++ b/nms-patches/PlayerConnection.patch
@@ -1553,12 +1553,12 @@
}
} else {
String s1;
-@@ -1062,10 +2139,12 @@
+@@ -1062,10 +2139,11 @@
}
itemstack2.a("pages", (NBTBase) nbttaglist);
+- this.player.setSlot(EnumItemSlot.MAINHAND, itemstack2);
+ CraftEventFactory.handleEditBookEvent(player, itemstack2); // CraftBukkit
- this.player.setSlot(EnumItemSlot.MAINHAND, itemstack2);
}
} catch (Exception exception1) {
PlayerConnection.LOGGER.error("Couldn\'t sign book", exception1);
@@ -1566,7 +1566,7 @@
}
} else if ("MC|TrSel".equals(s)) {
try {
-@@ -1077,6 +2156,7 @@
+@@ -1077,6 +2155,7 @@
}
} catch (Exception exception2) {
PlayerConnection.LOGGER.error("Couldn\'t select trade", exception2);
@@ -1574,7 +1574,7 @@
}
} else {
TileEntity tileentity;
-@@ -1126,6 +2206,7 @@
+@@ -1126,6 +2205,7 @@
}
} catch (Exception exception3) {
PlayerConnection.LOGGER.error("Couldn\'t set command block", exception3);
@@ -1582,7 +1582,7 @@
}
} else if ("MC|AutoCmd".equals(s)) {
if (!this.minecraftServer.getEnableCommandBlock()) {
-@@ -1193,6 +2274,7 @@
+@@ -1193,6 +2273,7 @@
}
} catch (Exception exception4) {
PlayerConnection.LOGGER.error("Couldn\'t set command block", exception4);
@@ -1590,7 +1590,7 @@
}
} else {
int k;
-@@ -1216,6 +2298,7 @@
+@@ -1216,6 +2297,7 @@
}
} catch (Exception exception5) {
PlayerConnection.LOGGER.error("Couldn\'t set beacon", exception5);
@@ -1598,7 +1598,7 @@
}
}
} else if ("MC|ItemName".equals(s)) {
-@@ -1302,6 +2385,7 @@
+@@ -1302,6 +2384,7 @@
}
} catch (Exception exception6) {
PlayerConnection.LOGGER.error("Couldn\'t set structure block", exception6);
@@ -1606,7 +1606,7 @@
}
} else if ("MC|PickItem".equals(s)) {
packetdataserializer = packetplayincustompayload.b();
-@@ -1316,9 +2400,31 @@
+@@ -1316,9 +2399,31 @@
PlayerConnection.LOGGER.error("Couldn\'t pick item", exception7);
}
}