Fix ClassCastException
This commit is contained in:
parent
ff210271c9
commit
57f9f7db4b
@ -106,7 +106,7 @@ public class BasketballGame implements Listener
|
||||
|
||||
private BasketballTeam getTeam(Player player)
|
||||
{
|
||||
if (player.getInventory().getHelmet() == null || player.getInventory().getHelmet().getType() != Material.LEATHER_HELMET)
|
||||
if (player.getInventory().getHelmet() == null || !(player.getInventory().getHelmet().getItemMeta() instanceof LeatherArmorMeta))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user