Sentry Issue #223489411
Check if fired projectile is a WitherSkull before casting Steps to reproduce: 1) Go to Wither Assult 2) Fire enderpearl
This commit is contained in:
parent
c4bb9a23d5
commit
2e23d59702
@ -255,6 +255,9 @@ public class WitherGame extends TeamGame implements IBlockRestorer
|
||||
if (GetState() == GameState.Recruit || GetState() == GameState.Prepare)
|
||||
{
|
||||
Projectile proj = event.getEntity();
|
||||
|
||||
if (proj instanceof WitherSkull)
|
||||
{
|
||||
WitherSkull ws = (WitherSkull) proj;
|
||||
|
||||
if (ws.getShooter() instanceof Wither)
|
||||
@ -263,6 +266,7 @@ public class WitherGame extends TeamGame implements IBlockRestorer
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void handleCustomBlockPlace(BlockPlaceEvent event)
|
||||
|
Loading…
Reference in New Issue
Block a user