mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-24 11:36:11 +01:00
Fixed not being able to fill milk buckets in build deny regions
Though added a check for use flag here
This commit is contained in:
parent
4895a3313b
commit
b918b29014
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user