mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-28 05:35:44 +01:00
Removed deprecated method and replaced with getOwner().
This commit is contained in:
parent
de45872c07
commit
e26d801cf2
@ -42,7 +42,7 @@ public class IslandTeamCommand extends CompositeCommand {
|
||||
@Override
|
||||
public boolean execute(User user, String label, List<String> args) {
|
||||
// Player issuing the command must have an island
|
||||
UUID teamLeaderUUID = getTeamLeader(getWorld(), user);
|
||||
UUID teamLeaderUUID = getOwner(getWorld(), user);
|
||||
if (teamLeaderUUID == null) {
|
||||
user.sendMessage("general.errors.no-island");
|
||||
return false;
|
||||
|
@ -29,7 +29,7 @@ public class IslandTeamKickCommand extends ConfirmableCommand {
|
||||
user.sendMessage("general.errors.no-team");
|
||||
return false;
|
||||
}
|
||||
if (!getTeamLeader(getWorld(), user).equals(user.getUniqueId())) {
|
||||
if (!getOwner(getWorld(), user).equals(user.getUniqueId())) {
|
||||
user.sendMessage("general.errors.not-leader");
|
||||
return false;
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ public class IslandTeamPromoteCommand extends CompositeCommand {
|
||||
user.sendMessage("general.errors.unknown-player", TextVariables.NAME, args.get(0));
|
||||
return true;
|
||||
}
|
||||
if (!inTeam(getWorld(), target) || !getTeamLeader(getWorld(), user).equals(getTeamLeader(getWorld(), target))) {
|
||||
if (!inTeam(getWorld(), target) || !getOwner(getWorld(), user).equals(getOwner(getWorld(), target))) {
|
||||
user.sendMessage("general.errors.not-in-team");
|
||||
return true;
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ public class IslandTeamSetownerCommand extends CompositeCommand {
|
||||
UUID playerUUID = user.getUniqueId();
|
||||
// Can use if in a team
|
||||
boolean inTeam = getPlugin().getIslands().inTeam(getWorld(), playerUUID);
|
||||
UUID teamLeaderUUID = getTeamLeader(getWorld(), user);
|
||||
UUID teamLeaderUUID = getOwner(getWorld(), user);
|
||||
if (!(inTeam && teamLeaderUUID.equals(playerUUID))) {
|
||||
user.sendMessage("general.errors.not-leader");
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user