Skip to content

Commit

Permalink
also work when waxing top half of door
Browse files Browse the repository at this point in the history
  • Loading branch information
rymiel committed Feb 20, 2025
1 parent 92b2c12 commit ff368df
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -633,8 +633,7 @@ public void onEntityChangeBlock(final EntityChangeBlockEvent e) {
}
// This event is called for waxing or axing a copper block. We need to update the protection to avoid mismatches.
// TODO: this might need to be monitor?
final BlockProtection blockProtection = plugin.loadProtection(e.getBlock());
if (blockProtection != null && e.getBlock().getType() != e.getTo()) {
if (protection instanceof final BlockProtection blockProtection && blockProtection.getBlock().equals(e.getBlock().getType().name()) && e.getBlock().getType() != e.getTo()) {
blockProtection.setBlock(e.getTo().name());
plugin.saveProtection(blockProtection);
}
Expand Down

0 comments on commit ff368df

Please sign in to comment.