Skip to content

Commit

Permalink
Fixed NPE in PlayerInteractEvent due to potion blocking. Fixes WORLDG…
Browse files Browse the repository at this point in the history
…UARD-2269.
  • Loading branch information
sk89q committed Nov 5, 2012
1 parent 916caa1 commit aec1e3a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ public void onPlayerInteract(PlayerInteractEvent event) {

if (wcfg.blockPotions.size() > 0) {
ItemStack item = event.getItem();
if (item.getType() == Material.POTION) {
if (item != null && item.getType() == Material.POTION) {
PotionEffect blockedEffect = null;

Potion potion = Potion.fromItemStack(item);
Expand Down

0 comments on commit aec1e3a

Please sign in to comment.