From b918b29014a321a6c78b5c3bb124c07b84e6f51e Mon Sep 17 00:00:00 2001 From: DerFlash Date: Mon, 24 Oct 2011 12:13:52 +0200 Subject: [PATCH] Fixed not being able to fill milk buckets in build deny regions Though added a check for use flag here --- .../worldguard/bukkit/WorldGuardPlayerListener.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/sk89q/worldguard/bukkit/WorldGuardPlayerListener.java b/src/main/java/com/sk89q/worldguard/bukkit/WorldGuardPlayerListener.java index 92b46ac6..99a55a66 100644 --- a/src/main/java/com/sk89q/worldguard/bukkit/WorldGuardPlayerListener.java +++ b/src/main/java/com/sk89q/worldguard/bukkit/WorldGuardPlayerListener.java @@ -943,7 +943,14 @@ public void onPlayerBucketFill(PlayerBucketFillEvent event) { ConfigurationManager cfg = plugin.getGlobalStateManager(); WorldConfiguration wcfg = cfg.get(world); - if (!plugin.getGlobalRegionManager().canBuild( + if (event.getItemStack().getType() == Material.MILK_BUCKET) { + if (!plugin.getGlobalRegionManager().allows(DefaultFlag.USE, player.getLocation().add(0, 1, 0))) { + player.sendMessage(ChatColor.DARK_RED + "You don't have permission to use this in this area."); + event.setCancelled(true); + return; + } + + } else if (!plugin.getGlobalRegionManager().canBuild( player, event.getBlockClicked().getRelative(event.getBlockFace()))) { player.sendMessage(ChatColor.DARK_RED + "You don't have permission for this area."); event.setCancelled(true);