mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-27 21:15:57 +01:00
Check bypass perms for item-drop flag.
This commit is contained in:
parent
d1e7796f81
commit
d47c255168
@ -1232,7 +1232,8 @@ public void onPlayerDropItem(PlayerDropItemEvent event) {
|
||||
Player player = event.getPlayer();
|
||||
|
||||
if (wcfg.useRegions) {
|
||||
if (!plugin.getGlobalRegionManager().allows(DefaultFlag.ITEM_DROP, player.getLocation())) {
|
||||
if (!plugin.getGlobalRegionManager().hasBypass(player, player.getWorld())
|
||||
&& !plugin.getGlobalRegionManager().allows(DefaultFlag.ITEM_DROP, player.getLocation())) {
|
||||
event.setCancelled(true);
|
||||
player.sendMessage(ChatColor.RED + "You don't have permission to do that in this area.");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user