Fix WaterBottleSplashEvent not forwarding hit result (#10203)

This commit is contained in:
Lulu13022002 2024-02-10 20:27:29 +01:00 committed by GitHub
parent 99bae594c8
commit bf6e803c6c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 79 additions and 35 deletions

View file

@ -82,7 +82,7 @@ diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b
index e420a558994129b2907d7e75152a558a01dc7b2e..c74e6c6cd92d618cde3733200bcc23279c0df679 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -1438,10 +1438,21 @@ public class CraftEventFactory {
@@ -1464,10 +1464,21 @@ public class CraftEventFactory {
}
public static AbstractContainerMenu callInventoryOpenEvent(ServerPlayer player, AbstractContainerMenu container) {
@ -105,7 +105,7 @@ index e420a558994129b2907d7e75152a558a01dc7b2e..c74e6c6cd92d618cde3733200bcc2327
if (player.containerMenu != player.inventoryMenu) { // fire INVENTORY_CLOSE if one already open
player.connection.handleContainerClose(new ServerboundContainerClosePacket(player.containerMenu.containerId), InventoryCloseEvent.Reason.OPEN_NEW); // Paper - Inventory close reason
}
@@ -1456,10 +1467,10 @@ public class CraftEventFactory {
@@ -1482,10 +1493,10 @@ public class CraftEventFactory {
if (event.isCancelled()) {
container.transferTo(player.containerMenu, craftPlayer);