Fixed owners who could not kick team members (#567)

So, UUID cannot be compared with == and !=. It should be always use UUID#equals(UUID) method.
This commit is contained in:
BONNe 2019-02-20 00:30:37 +02:00 committed by Florian CUNY
parent a505a3cede
commit 34b2440117

View File

@ -34,7 +34,7 @@ public class IslandTeamKickCommand extends ConfirmableCommand {
user.sendMessage("general.errors.no-team");
return false;
}
if (user.getUniqueId() != getOwner(getWorld(), user)) {
if (!user.getUniqueId().equals(getOwner(getWorld(), user))) {
user.sendMessage("general.errors.not-owner");
return false;
}
@ -102,4 +102,4 @@ public class IslandTeamKickCommand extends ConfirmableCommand {
getParent().getSubCommand("invite").ifPresent(c -> c.setCooldown(user.getUniqueId(), targetUUID, getSettings().getInviteCooldown() * 60));
}
}
}
}