mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-24 11:45:31 +01:00
Removed deprecated method and replaced with getOwner().
This commit is contained in:
parent
de45872c07
commit
e26d801cf2
@ -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();
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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