Updated Upstream (Bukkit/CraftBukkit) (#9876)

Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
19830133 PR-925: Add hit entity/block to events extending ProjectileHitEvent

CraftBukkit Changes:
5a72c3c04 SPIGOT-7510: Try to fix broken reflection usage of plugins
6fa69f235 PR-1281: Add hit entity/block to events extending ProjectileHitEvent
224f733ac Fix NPE introduced in #f4d977e
This commit is contained in:
Jake Potrebic 2023-10-28 15:02:13 -07:00 committed by GitHub
parent 996d529fb3
commit 8cf2503804
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
28 changed files with 203 additions and 99 deletions

View file

@ -6,10 +6,10 @@ Subject: [PATCH] Add ProjectileCollideEvent
Deprecated now and replaced with ProjectileHitEvent
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 82a0f2ab2d49cca715b04a5cc661dc81bef3090e..5a61bc2979854d891f8f4e384b3c248d882555b3 100644
index d5e4c8a0415f74ba3a7964c7ff491bb37bbff16d..933cfc466aced42c3c765093c2a987b9f09089a4 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -1337,6 +1337,17 @@ public class CraftEventFactory {
@@ -1363,6 +1363,17 @@ public class CraftEventFactory {
return CraftItemStack.asNMSCopy(bitem);
}
@ -27,7 +27,7 @@ index 82a0f2ab2d49cca715b04a5cc661dc81bef3090e..5a61bc2979854d891f8f4e384b3c248d
public static ProjectileLaunchEvent callProjectileLaunchEvent(Entity entity) {
Projectile bukkitEntity = (Projectile) entity.getBukkitEntity();
ProjectileLaunchEvent event = new ProjectileLaunchEvent(bukkitEntity);
@@ -1361,8 +1372,15 @@ public class CraftEventFactory {
@@ -1387,8 +1398,15 @@ public class CraftEventFactory {
if (position.getType() == HitResult.Type.ENTITY) {
hitEntity = ((EntityHitResult) position).getEntity().getBukkitEntity();
}