Fixes and additions to projectile API (#9237)

This commit is contained in:
Jake Potrebic 2023-05-31 19:43:51 -07:00 committed by GitHub
parent 2eda177116
commit bacbf86ed2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 233 additions and 8 deletions

View file

@ -178,10 +178,18 @@ index 94e1a30ea1bc26821065a6d89c1f5669bd1d08ae..6ed83d3e4d23e0dc0e1b156a1ee221aa
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/entity/Projectile.java b/src/main/java/org/bukkit/entity/Projectile.java
index a523fca4baab447181ef91df67fa69b24e010149..d97904540ff5cf103604862a5a1a3a41f56dfe33 100644
index a523fca4baab447181ef91df67fa69b24e010149..81ff7003e15e209358e8434a6875af79a4eb57f2 100644
--- a/src/main/java/org/bukkit/entity/Projectile.java
+++ b/src/main/java/org/bukkit/entity/Projectile.java
@@ -43,4 +43,80 @@ public interface Projectile extends Entity {
@@ -12,6 +12,7 @@ public interface Projectile extends Entity {
* Retrieve the shooter of this projectile.
*
* @return the {@link ProjectileSource} that shot this projectile
+ * @see #getOwnerUniqueId()
*/
@Nullable
public ProjectileSource getShooter();
@@ -43,4 +44,89 @@ public interface Projectile extends Entity {
*/
@Deprecated(forRemoval = true) // Paper
public void setBounce(boolean doesBounce);
@ -260,6 +268,15 @@ index a523fca4baab447181ef91df67fa69b24e010149..d97904540ff5cf103604862a5a1a3a41
+ * @see #canHitEntity(Entity)
+ */
+ void hitEntity(@org.jetbrains.annotations.NotNull Entity entity, @org.jetbrains.annotations.NotNull org.bukkit.util.Vector vector);
+
+ /**
+ * Gets the owner's UUID
+ *
+ * @return the owner's UUID, or null if not owned
+ * @see #getShooter()
+ */
+ @Nullable
+ java.util.UUID getOwnerUniqueId();
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/entity/ShulkerBullet.java b/src/main/java/org/bukkit/entity/ShulkerBullet.java