Refresh ProjectileSource for projectiles
Makes sure the value returned by Projectile#getShooter in the API matches the owner UUID specified in the entity nbt. Previously, after the entity reloaded, Projectile#getShooter would return null, while the entity still had an owner. Also fixes setting the shooter/owner to null actually clearing the owner. Co-authored-by: Warrior <50800980+Warriorrrr@users.noreply.github.com>
This commit is contained in:
@@ -60,6 +60,7 @@ public abstract class AbstractProjectile extends CraftEntity implements Projecti
|
||||
|
||||
@Override
|
||||
public final org.bukkit.projectiles.ProjectileSource getShooter() {
|
||||
this.getHandle().refreshProjectileSource(true); // Paper - Refresh ProjectileSource for projectiles
|
||||
return this.getHandle().projectileSource;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user