Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ public void onBlockPlace(final BlockPlaceEvent e) {
if (protection == null) {
return;
}
if (Tag.REPLACEABLE.isTagged(e.getBlockReplacedState().getType())) {
if (Tag.REPLACEABLE.isTagged(replaced.getType()) && protection instanceof BlockProtection blockProtection && blockProtection.getBlock().equals(replaced.getType().toString())) {
// Prevent accidental deletion of protected blocks by them getting replaced.
// Purposefully not checking for destroy permissions, that logic is for BlockBreakEvent.
e.setCancelled(true);
Expand Down