Fixed Lingering Potion Event Exception

This commit is contained in:
Driftay 2019-03-23 01:45:14 -04:00
parent 88b55ea866
commit 9bbb3b35ab

View File

@ -748,9 +748,9 @@ public class FactionsPlayerListener implements Listener {
if (event.getPlayer().getItemInHand() != null) { if (event.getPlayer().getItemInHand() != null) {
Material handItem = event.getPlayer().getItemInHand().getType(); Material handItem = event.getPlayer().getItemInHand().getType();
if (handItem.isEdible() if (handItem.isEdible()
|| handItem.equals(Material.POTION) || handItem.equals(MultiversionMaterials.POTION.parseMaterial())
|| handItem.equals(Material.LINGERING_POTION) || handItem.equals(MultiversionMaterials.LINGERING_POTION.parseMaterial())
|| handItem.equals(Material.SPLASH_POTION)) { || handItem.equals(MultiversionMaterials.SPLASH_POTION.parseMaterial())) {
return; return;
} }
} }