mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-18 15:17:36 +01:00
Fixed regression bug cause item frames and paintings to not be protected.
This commit is contained in:
parent
b8c9e78910
commit
051e0cb811
@ -78,8 +78,10 @@ public void onHangingingBreak(HangingBreakEvent event) {
|
|||||||
|
|
||||||
if (event instanceof HangingBreakByEntityEvent) {
|
if (event instanceof HangingBreakByEntityEvent) {
|
||||||
HangingBreakByEntityEvent entityEvent = (HangingBreakByEntityEvent) event;
|
HangingBreakByEntityEvent entityEvent = (HangingBreakByEntityEvent) event;
|
||||||
if (entityEvent instanceof Player) {
|
Entity removerEntity = entityEvent.getRemover();
|
||||||
Player player = (Player) entityEvent.getRemover();
|
|
||||||
|
if (removerEntity instanceof Player) {
|
||||||
|
Player player = (Player) removerEntity;
|
||||||
|
|
||||||
if (wcfg.getBlacklist() != null) {
|
if (wcfg.getBlacklist() != null) {
|
||||||
if (hanging instanceof Painting
|
if (hanging instanceof Painting
|
||||||
@ -105,7 +107,7 @@ public void onHangingingBreak(HangingBreakEvent event) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (entityEvent.getRemover() instanceof Creeper) {
|
if (removerEntity instanceof Creeper) {
|
||||||
if (wcfg.blockCreeperBlockDamage || wcfg.blockCreeperExplosions) {
|
if (wcfg.blockCreeperBlockDamage || wcfg.blockCreeperExplosions) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user