Only add backupregions if whitelisting

This commit is contained in:
dordsor21 2021-10-25 14:12:36 +01:00
parent 4e6aee6bfb
commit f7e94fd450
No known key found for this signature in database
GPG Key ID: 1E53E88969FFCF0B

View File

@ -147,12 +147,14 @@ public class WEManager {
player.printError(TextComponent.of("Missing permission " + "fawe." + manager.getKey()));
}
}
if (isWhitelist) {
regions.addAll(backupRegions);
if (!masks.isEmpty() && isWhitelist) {
if (!masks.isEmpty()) {
player.setMeta("lastMask", masks);
} else if (isWhitelist) {
} else {
player.deleteMeta("lastMask");
}
}
return regions.toArray(new Region[0]);
}