mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2025-01-23 08:31:47 +01:00
Track causes when players ignite creepers.
Fixes WORLDGUARD-4136.
This commit is contained in:
parent
c633a2d070
commit
5fca3b3c3d
@ -58,9 +58,7 @@
|
||||
import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.block.BlockState;
|
||||
import org.bukkit.block.Chest;
|
||||
import org.bukkit.block.Container;
|
||||
import org.bukkit.block.DoubleChest;
|
||||
import org.bukkit.block.Dropper;
|
||||
import org.bukkit.block.Hopper;
|
||||
import org.bukkit.block.PistonMoveReaction;
|
||||
import org.bukkit.block.data.Waterlogged;
|
||||
@ -751,7 +749,12 @@ public void onPlayerInteractEntity(PlayerInteractEntityEvent event) {
|
||||
if (matchingItem != null && hasInteractBypass(world, matchingItem)) {
|
||||
useEntityEvent.setAllowed(true);
|
||||
}
|
||||
Events.fireToCancel(event, useEntityEvent);
|
||||
if (!Events.fireToCancel(event, useEntityEvent)) {
|
||||
// so this is a hack but CreeperIgniteEvent doesn't actually tell us who, so we need to do it here
|
||||
if (item.getType() == Material.FLINT_AND_STEEL && entity.getType() == EntityType.CREEPER) {
|
||||
Cause.trackParentCause(entity, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(ignoreCancelled = true)
|
||||
|
Loading…
Reference in New Issue
Block a user