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

@ -36,13 +36,13 @@ public class IslandTeamCommand extends CompositeCommand {
new IslandTeamUntrustCommand(this);
new IslandTeamPromoteCommand(this, "promote");
new IslandTeamPromoteCommand(this, "demote");
}
@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;
@ -72,7 +72,7 @@ public class IslandTeamCommand extends CompositeCommand {
private boolean fireEvent(User user) {
IslandBaseEvent event = TeamEvent.builder()
.island(getIslands()
.getIsland(getWorld(), user.getUniqueId()))
.getIsland(getWorld(), user.getUniqueId()))
.reason(TeamEvent.Reason.INFO)
.involvedPlayer(user.getUniqueId())
.build();

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

@ -22,7 +22,7 @@ public class IslandTeamPromoteCommand extends CompositeCommand {
setDescription("commands.island.team.promote.description");
} else {
setParametersHelp("commands.island.team.demote.parameters");
setDescription("commands.island.team.demote.description");
setDescription("commands.island.team.demote.description");
}
}
@ -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;