Skip to content

Commit

Permalink
Allow spectators to bypass claim protection
Browse files Browse the repository at this point in the history
  • Loading branch information
UnRealDinnerbone committed Jun 13, 2022
1 parent 5db7e37 commit d00345c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,13 @@ public boolean protect(@Nullable Entity entity, InteractionHand hand, BlockPos p
return override.getProtect();
}

return isFake || !getBypassProtection(player.getUUID());
return !player.isSpectator() && (isFake || !getBypassProtection(player.getUUID()));
} else if (FTBChunksWorldConfig.noWilderness(player)) {
ProtectionOverride override = protection.override(player, pos, hand, null);

if (override.isOverride()) {
return override.getProtect();
} else if (!isFake && getBypassProtection(player.getUUID())) {
} else if (!isFake && (getBypassProtection(player.getUUID()) || player.isSpectator())) {
return false;
}

Expand Down

0 comments on commit d00345c

Please sign in to comment.