Fix EntityLoadCrossbowEvent Sync Issue (#5739)

This commit is contained in:
LemonCaramel 2021-12-31 15:54:23 +09:00 committed by GitHub
parent 2d458ee14f
commit 686bbd33d4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 10 deletions

View file

@ -6,10 +6,10 @@ Subject: [PATCH] Add EntityLoadCrossbowEvent
diff --git a/src/main/java/io/papermc/paper/event/entity/EntityLoadCrossbowEvent.java b/src/main/java/io/papermc/paper/event/entity/EntityLoadCrossbowEvent.java
new file mode 100644
index 0000000000000000000000000000000000000000..287f487b266d5c12fcf6f028452735e314d55636
index 0000000000000000000000000000000000000000..aa9ccd7c806e864455ecd5f15ddb17c0fa8728c4
--- /dev/null
+++ b/src/main/java/io/papermc/paper/event/entity/EntityLoadCrossbowEvent.java
@@ -0,0 +1,101 @@
@@ -0,0 +1,97 @@
+package io.papermc.paper.event.entity;
+
+import org.bukkit.entity.LivingEntity;
@ -89,10 +89,6 @@ index 0000000000000000000000000000000000000000..287f487b266d5c12fcf6f028452735e3
+ * Set whether or not to cancel the crossbow being loaded. If canceled, the
+ * projectile that would be loaded into the crossbow will not be consumed.
+ *
+ * If set to false, and this event is pertaining to a player entity,
+ * it's recommended that a call to {@link Player#updateInventory()} is made
+ * as the client may think the server still loaded an item into the crossbow.
+ *
+ * @param cancel true if you wish to cancel this event
+ */
+ @Override