Update EntityProjectile.java

Makes sure that these Arrows cannot be picked up by Survival Players
This commit is contained in:
C_Corp2002 authored and GitHub committed 2024-01-08 18:34:31 -05:00
1 parent 339fad98f3
commit f2518d0367
1 file changed
+3 -1
@@ -91,8 +91,10 @@ public class EntityProjectile extends SiegeEngineProjectile {
if (arrow instanceof Arrow) {
Arrow arr = (Arrow) arrow;
arr.setDamage(8);
if (player instanceof org.bukkit.projectiles.ProjectileSource)
if (player instanceof org.bukkit.projectiles.ProjectileSource) {
arr.setShooter((org.bukkit.projectiles.ProjectileSource) player);
arr.setPickupStatus(org.bukkit.entity.AbstractArrow.PickupStatus.CREATIVE_ONLY);
}
}
if (playSound) {
world.playSound(loc, this.soundType, 20, 2);