mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2025-01-19 14:41:25 +01:00
Fixed interact and use blacklist events being grouped together incorrectly when right clicking a container.
This commit is contained in:
parent
b1c8fc82c4
commit
a521ab76a5
@ -623,23 +623,24 @@ private void handleBlockRightClick(PlayerInteractEvent event) {
|
||||
|
||||
if (wcfg.getBlacklist() != null) {
|
||||
if((block.getType() != Material.CHEST
|
||||
&& block.getType() != Material.DISPENSER
|
||||
&& block.getType() != Material.FURNACE
|
||||
&& block.getType() != Material.BURNING_FURNACE)) {
|
||||
&& block.getType() != Material.DISPENSER
|
||||
&& block.getType() != Material.FURNACE
|
||||
&& block.getType() != Material.BURNING_FURNACE)) {
|
||||
if (!wcfg.getBlacklist().check(
|
||||
new ItemUseBlacklistEvent(plugin.wrapPlayer(player), toVector(block),
|
||||
item.getTypeId()), false, false)) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!wcfg.getBlacklist().check(
|
||||
new BlockInteractBlacklistEvent(plugin.wrapPlayer(player), toVector(block),
|
||||
block.getTypeId()), false, false)) {
|
||||
item.getTypeId()), false, false)) {
|
||||
event.setUseItemInHand(Result.DENY);
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!wcfg.getBlacklist().check(
|
||||
new BlockInteractBlacklistEvent(plugin.wrapPlayer(player), toVector(block),
|
||||
block.getTypeId()), false, false)) {
|
||||
event.setUseInteractedBlock(Result.DENY);
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user