this is how you properly silence bells

This commit is contained in:
ZeroEpoch1969
2019-07-30 21:35:41 -07:00
parent 95ef7d6cfe
commit 9cb4bd7822
9 changed files with 52 additions and 91 deletions

View File

@ -51,6 +51,18 @@ public class InteractBlocker extends FreedomService
}
}
@EventHandler(priority = EventPriority.HIGH)
public void onRightClickBell(PlayerInteractEvent event)
{
if (event.getClickedBlock().getType().equals(Material.BELL))
{
if (!ConfigEntry.ALLOW_BELLS.getBoolean())
{
event.setCancelled(true);
}
}
}
private void handleRightClick(PlayerInteractEvent event)
{
final Player player = event.getPlayer();