mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-03 06:40:19 +08:00
Fix cancelling PlayerEditBookEvent
This commit is contained in:
parent
eed13ca548
commit
221508dce3
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user