mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-25 02:27:42 +01:00
Made sleep flag proactive enough to keep them from blowing the nether up.
This commit is contained in:
parent
e2fc6a3ff0
commit
7b12510182
@ -548,6 +548,16 @@ private void handleBlockRightClick(PlayerInteractEvent event) {
|
||||
}
|
||||
}
|
||||
|
||||
if (type == Material.BED_BLOCK) {
|
||||
if (!plugin.getGlobalRegionManager().hasBypass(player, world)
|
||||
&& !set.allows(DefaultFlag.SLEEP)) {
|
||||
player.sendMessage(ChatColor.DARK_RED + "You're not allowed to use that bed.");
|
||||
event.setUseInteractedBlock(Result.DENY);
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (type == Material.CHEST
|
||||
|| type == Material.JUKEBOX //stores the (arguably) most valuable item
|
||||
|| type == Material.DISPENSER
|
||||
|
Loading…
Reference in New Issue
Block a user