mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2025-06-12 13:53:54 +00:00
this is how you properly silence bells
This commit is contained in:
@ -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();
|
||||
|
Reference in New Issue
Block a user