mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-15 15:16:06 +01:00
Silence EntityChangeBlock for redstone ore.
We already silence this for Action.PHYSICAL PlayerInteractEvents. Unfortunately Bukkit throws another event at us without the extra info about interaction type, which gets fired if the interact flag is allow. So silence that too. Closes #1573.
This commit is contained in:
parent
47cd96a3af
commit
b2d2d0815b
@ -35,7 +35,6 @@
|
||||
import com.sk89q.worldguard.bukkit.event.entity.SpawnEntityEvent;
|
||||
import com.sk89q.worldguard.bukkit.event.entity.UseEntityEvent;
|
||||
import com.sk89q.worldguard.bukkit.event.inventory.UseItemEvent;
|
||||
import com.sk89q.worldguard.bukkit.internal.WGMetadata;
|
||||
import com.sk89q.worldguard.bukkit.listener.debounce.BlockPistonExtendKey;
|
||||
import com.sk89q.worldguard.bukkit.listener.debounce.BlockPistonRetractKey;
|
||||
import com.sk89q.worldguard.bukkit.listener.debounce.EventDebounce;
|
||||
@ -274,6 +273,8 @@ public void onEntityChangeBlock(EntityChangeBlockEvent event) {
|
||||
if (trample) {
|
||||
breakDelagate.setSilent(true);
|
||||
breakDelagate.getRelevantFlags().add(Flags.TRAMPLE_BLOCKS);
|
||||
} else if (fromType == Material.REDSTONE_ORE) {
|
||||
breakDelagate.setSilent(true);
|
||||
}
|
||||
boolean denied;
|
||||
if (!(denied = Events.fireToCancel(event, breakDelagate))) {
|
||||
|
Loading…
Reference in New Issue
Block a user