mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-18 07:07:43 +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) {
|
||||
HangingBreakByEntityEvent entityEvent = (HangingBreakByEntityEvent) event;
|
||||
if (entityEvent instanceof Player) {
|
||||
Player player = (Player) entityEvent.getRemover();
|
||||
Entity removerEntity = entityEvent.getRemover();
|
||||
|
||||
if (removerEntity instanceof Player) {
|
||||
Player player = (Player) removerEntity;
|
||||
|
||||
if (wcfg.getBlacklist() != null) {
|
||||
if (hanging instanceof Painting
|
||||
@ -105,7 +107,7 @@ public void onHangingingBreak(HangingBreakEvent event) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (entityEvent.getRemover() instanceof Creeper) {
|
||||
if (removerEntity instanceof Creeper) {
|
||||
if (wcfg.blockCreeperBlockDamage || wcfg.blockCreeperExplosions) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user