mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-22 18:55:17 +01:00
Fixes bug where non-members could be made island owners.
This commit is contained in:
parent
7f532b1257
commit
4170616e47
@ -520,7 +520,8 @@ public class IslandTeamCommand extends CompositeCommand {
|
|||||||
case "SETOWNER" -> {
|
case "SETOWNER" -> {
|
||||||
// Make the player the leader of the island
|
// Make the player the leader of the island
|
||||||
if (clickingUser.hasPermission(this.setOwnerCommand.getPermission()) && !target.equals(clickingUser)
|
if (clickingUser.hasPermission(this.setOwnerCommand.getPermission()) && !target.equals(clickingUser)
|
||||||
&& clickingUser.getUniqueId().equals(island.getOwner())) {
|
&& clickingUser.getUniqueId().equals(island.getOwner())
|
||||||
|
&& island.getRank(target) >= RanksManager.MEMBER_RANK) {
|
||||||
getPlugin().log("Set Owner: " + clickingUser.getName() + " trying to make " + target.getName()
|
getPlugin().log("Set Owner: " + clickingUser.getName() + " trying to make " + target.getName()
|
||||||
+ " owner of island at " + island.getCenter());
|
+ " owner of island at " + island.getCenter());
|
||||||
clickingUser.closeInventory();
|
clickingUser.closeInventory();
|
||||||
|
Loading…
Reference in New Issue
Block a user