mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-10-02 00:27:28 +02:00
Add 'use' flag to cakes
This commit is contained in:
parent
684214ff6a
commit
e60b20b37b
@ -667,7 +667,8 @@ private void handleBlockRightClick(PlayerInteractEvent event) {
|
|||||||
|
|
||||||
if (type == BlockID.CAKE_BLOCK) {
|
if (type == BlockID.CAKE_BLOCK) {
|
||||||
if (!plugin.getGlobalRegionManager().hasBypass(player, world)
|
if (!plugin.getGlobalRegionManager().hasBypass(player, world)
|
||||||
&& !set.canBuild(localPlayer)) {
|
&& !set.canBuild(localPlayer)
|
||||||
|
&& !set.allows(DefaultFlag.USE, localPlayer)) {
|
||||||
player.sendMessage(ChatColor.DARK_RED + "You're not invited to this tea party!");
|
player.sendMessage(ChatColor.DARK_RED + "You're not invited to this tea party!");
|
||||||
event.setUseInteractedBlock(Result.DENY);
|
event.setUseInteractedBlock(Result.DENY);
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
|
Loading…
Reference in New Issue
Block a user