mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-24 03:25:24 +01:00
Fixed NPE in PlayerInteractEvent due to potion blocking. Fixes WORLDGUARD-2269.
This commit is contained in:
parent
916caa1eb2
commit
aec1e3a529
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user