Fix ClassCastException

This commit is contained in:
AlexTheCoder 2016-07-21 13:25:17 -04:00
parent ff210271c9
commit 57f9f7db4b

View File

@ -106,7 +106,7 @@ public class BasketballGame implements Listener
private BasketballTeam getTeam(Player player) 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; return null;
} }