Removed deprecated method and replaced with getOwner().

This commit is contained in:
tastybento 2018-11-18 19:03:51 -08:00
parent de45872c07
commit e26d801cf2
4 changed files with 7 additions and 7 deletions

View File

@ -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;

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;