Fixed NPE in PlayerInteractEvent due to potion blocking. Fixes WORLDGUARD-2269.

This commit is contained in:
sk89q 2012-11-05 11:09:14 -08:00
parent 916caa1eb2
commit aec1e3a529

View File

@ -425,7 +425,7 @@ public void onPlayerInteract(PlayerInteractEvent event) {
if (wcfg.blockPotions.size() > 0) { if (wcfg.blockPotions.size() > 0) {
ItemStack item = event.getItem(); ItemStack item = event.getItem();
if (item.getType() == Material.POTION) { if (item != null && item.getType() == Material.POTION) {
PotionEffect blockedEffect = null; PotionEffect blockedEffect = null;
Potion potion = Potion.fromItemStack(item); Potion potion = Potion.fromItemStack(item);