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
|
@Override
|
||||||
public boolean execute(User user, String label, List<String> args) {
|
public boolean execute(User user, String label, List<String> args) {
|
||||||
// Player issuing the command must have an island
|
// Player issuing the command must have an island
|
||||||
UUID teamLeaderUUID = getTeamLeader(getWorld(), user);
|
UUID teamLeaderUUID = getOwner(getWorld(), user);
|
||||||
if (teamLeaderUUID == null) {
|
if (teamLeaderUUID == null) {
|
||||||
user.sendMessage("general.errors.no-island");
|
user.sendMessage("general.errors.no-island");
|
||||||
return false;
|
return false;
|
||||||
@ -72,7 +72,7 @@ public class IslandTeamCommand extends CompositeCommand {
|
|||||||
private boolean fireEvent(User user) {
|
private boolean fireEvent(User user) {
|
||||||
IslandBaseEvent event = TeamEvent.builder()
|
IslandBaseEvent event = TeamEvent.builder()
|
||||||
.island(getIslands()
|
.island(getIslands()
|
||||||
.getIsland(getWorld(), user.getUniqueId()))
|
.getIsland(getWorld(), user.getUniqueId()))
|
||||||
.reason(TeamEvent.Reason.INFO)
|
.reason(TeamEvent.Reason.INFO)
|
||||||
.involvedPlayer(user.getUniqueId())
|
.involvedPlayer(user.getUniqueId())
|
||||||
.build();
|
.build();
|
||||||
|
@ -29,7 +29,7 @@ public class IslandTeamKickCommand extends ConfirmableCommand {
|
|||||||
user.sendMessage("general.errors.no-team");
|
user.sendMessage("general.errors.no-team");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!getTeamLeader(getWorld(), user).equals(user.getUniqueId())) {
|
if (!getOwner(getWorld(), user).equals(user.getUniqueId())) {
|
||||||
user.sendMessage("general.errors.not-leader");
|
user.sendMessage("general.errors.not-leader");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,7 @@ public class IslandTeamPromoteCommand extends CompositeCommand {
|
|||||||
user.sendMessage("general.errors.unknown-player", TextVariables.NAME, args.get(0));
|
user.sendMessage("general.errors.unknown-player", TextVariables.NAME, args.get(0));
|
||||||
return true;
|
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");
|
user.sendMessage("general.errors.not-in-team");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ public class IslandTeamSetownerCommand extends CompositeCommand {
|
|||||||
UUID playerUUID = user.getUniqueId();
|
UUID playerUUID = user.getUniqueId();
|
||||||
// Can use if in a team
|
// Can use if in a team
|
||||||
boolean inTeam = getPlugin().getIslands().inTeam(getWorld(), playerUUID);
|
boolean inTeam = getPlugin().getIslands().inTeam(getWorld(), playerUUID);
|
||||||
UUID teamLeaderUUID = getTeamLeader(getWorld(), user);
|
UUID teamLeaderUUID = getOwner(getWorld(), user);
|
||||||
if (!(inTeam && teamLeaderUUID.equals(playerUUID))) {
|
if (!(inTeam && teamLeaderUUID.equals(playerUUID))) {
|
||||||
user.sendMessage("general.errors.not-leader");
|
user.sendMessage("general.errors.not-leader");
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user