Ignore NPCs for island lock

https://github.com/BentoBoxWorld/BentoBox/issues/1518
This commit is contained in:
tastybento 2020-09-12 15:52:17 -07:00
parent 78876926ba
commit b6c30fc466

View File

@ -104,8 +104,8 @@ public class LockAndBanListener extends FlagListener {
* @return CheckResult LOCKED, BANNED or OPEN. If an island is locked, that will take priority over banned
*/
private CheckResult check(Player player, Location loc) {
// Ops are allowed everywhere
if (player.isOp()) {
// Ops or NPC's are allowed everywhere
if (player.isOp() || player.hasMetadata("NPC")) {
return CheckResult.OPEN;
}
// See if the island is locked to non-members or player is banned