mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-27 13:15:28 +01:00
Change to island range perm check on ownership change.
If owner has no perms, then this check will not be done and the range will not change. Previously, it was always reseting to the default range. https://github.com/BentoBoxWorld/BentoBox/issues/1145
This commit is contained in:
parent
ea08bab01d
commit
a5503851c3
@ -1094,7 +1094,10 @@ public class IslandsManager {
|
||||
// Tell target. If they are offline, then they may receive a message when they login
|
||||
target.sendMessage("commands.island.team.setowner.you-are-the-owner");
|
||||
// Permission checks for range changes only work when the target is online
|
||||
if (target.isOnline()) {
|
||||
if (target.isOnline() &&
|
||||
target.getEffectivePermissions().parallelStream()
|
||||
.map(p -> p.getPermission())
|
||||
.anyMatch(p -> p.startsWith(addon.getPermissionPrefix() + "island.range"))) {
|
||||
// Check if new owner has a different range permission than the island size
|
||||
int range = target.getPermissionValue(
|
||||
addon.getPermissionPrefix() + "island.range",
|
||||
|
Loading…
Reference in New Issue
Block a user