Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-16 04:50:05 +01:00
Fix cancelling PlayerEditBookEvent
Dieser Commit ist enthalten in:
Ursprung
eed13ca548
Commit
221508dce3
@ -1553,12 +1553,12 @@
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
String s1;
|
String s1;
|
||||||
@@ -1062,10 +2139,12 @@
|
@@ -1062,10 +2139,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
itemstack2.a("pages", (NBTBase) nbttaglist);
|
itemstack2.a("pages", (NBTBase) nbttaglist);
|
||||||
|
- this.player.setSlot(EnumItemSlot.MAINHAND, itemstack2);
|
||||||
+ CraftEventFactory.handleEditBookEvent(player, itemstack2); // CraftBukkit
|
+ CraftEventFactory.handleEditBookEvent(player, itemstack2); // CraftBukkit
|
||||||
this.player.setSlot(EnumItemSlot.MAINHAND, itemstack2);
|
|
||||||
}
|
}
|
||||||
} catch (Exception exception1) {
|
} catch (Exception exception1) {
|
||||||
PlayerConnection.LOGGER.error("Couldn\'t sign book", exception1);
|
PlayerConnection.LOGGER.error("Couldn\'t sign book", exception1);
|
||||||
@ -1566,7 +1566,7 @@
|
|||||||
}
|
}
|
||||||
} else if ("MC|TrSel".equals(s)) {
|
} else if ("MC|TrSel".equals(s)) {
|
||||||
try {
|
try {
|
||||||
@@ -1077,6 +2156,7 @@
|
@@ -1077,6 +2155,7 @@
|
||||||
}
|
}
|
||||||
} catch (Exception exception2) {
|
} catch (Exception exception2) {
|
||||||
PlayerConnection.LOGGER.error("Couldn\'t select trade", exception2);
|
PlayerConnection.LOGGER.error("Couldn\'t select trade", exception2);
|
||||||
@ -1574,7 +1574,7 @@
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
TileEntity tileentity;
|
TileEntity tileentity;
|
||||||
@@ -1126,6 +2206,7 @@
|
@@ -1126,6 +2205,7 @@
|
||||||
}
|
}
|
||||||
} catch (Exception exception3) {
|
} catch (Exception exception3) {
|
||||||
PlayerConnection.LOGGER.error("Couldn\'t set command block", exception3);
|
PlayerConnection.LOGGER.error("Couldn\'t set command block", exception3);
|
||||||
@ -1582,7 +1582,7 @@
|
|||||||
}
|
}
|
||||||
} else if ("MC|AutoCmd".equals(s)) {
|
} else if ("MC|AutoCmd".equals(s)) {
|
||||||
if (!this.minecraftServer.getEnableCommandBlock()) {
|
if (!this.minecraftServer.getEnableCommandBlock()) {
|
||||||
@@ -1193,6 +2274,7 @@
|
@@ -1193,6 +2273,7 @@
|
||||||
}
|
}
|
||||||
} catch (Exception exception4) {
|
} catch (Exception exception4) {
|
||||||
PlayerConnection.LOGGER.error("Couldn\'t set command block", exception4);
|
PlayerConnection.LOGGER.error("Couldn\'t set command block", exception4);
|
||||||
@ -1590,7 +1590,7 @@
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
int k;
|
int k;
|
||||||
@@ -1216,6 +2298,7 @@
|
@@ -1216,6 +2297,7 @@
|
||||||
}
|
}
|
||||||
} catch (Exception exception5) {
|
} catch (Exception exception5) {
|
||||||
PlayerConnection.LOGGER.error("Couldn\'t set beacon", exception5);
|
PlayerConnection.LOGGER.error("Couldn\'t set beacon", exception5);
|
||||||
@ -1598,7 +1598,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if ("MC|ItemName".equals(s)) {
|
} else if ("MC|ItemName".equals(s)) {
|
||||||
@@ -1302,6 +2385,7 @@
|
@@ -1302,6 +2384,7 @@
|
||||||
}
|
}
|
||||||
} catch (Exception exception6) {
|
} catch (Exception exception6) {
|
||||||
PlayerConnection.LOGGER.error("Couldn\'t set structure block", exception6);
|
PlayerConnection.LOGGER.error("Couldn\'t set structure block", exception6);
|
||||||
@ -1606,7 +1606,7 @@
|
|||||||
}
|
}
|
||||||
} else if ("MC|PickItem".equals(s)) {
|
} else if ("MC|PickItem".equals(s)) {
|
||||||
packetdataserializer = packetplayincustompayload.b();
|
packetdataserializer = packetplayincustompayload.b();
|
||||||
@@ -1316,9 +2400,31 @@
|
@@ -1316,9 +2399,31 @@
|
||||||
PlayerConnection.LOGGER.error("Couldn\'t pick item", exception7);
|
PlayerConnection.LOGGER.error("Couldn\'t pick item", exception7);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren