smartn't @ZeroEpoch1969

Signed-off-by: Robinson Gallego <robinson.leal7@gmail.com>
This commit is contained in:
Robinson Gallego 2019-07-31 13:15:09 -04:00
parent ca868a290d
commit 561854f2f0

View file

@ -54,11 +54,14 @@ public class InteractBlocker extends FreedomService
@EventHandler(priority = EventPriority.HIGH)
public void onRightClickBell(PlayerInteractEvent event)
{
if (event.getClickedBlock().getType().equals(Material.BELL))
if (event.getClickedBlock() != null)
{
if (!ConfigEntry.ALLOW_BELLS.getBoolean())
if (event.getClickedBlock().getType().equals(Material.BELL))
{
event.setCancelled(true);
if (!ConfigEntry.ALLOW_BELLS.getBoolean())
{
event.setCancelled(true);
}
}
}
}