mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-12-22 00:58:04 +01:00
Fixed some code smells in AdminGetRankCommand
This commit is contained in:
parent
90be5e5de6
commit
b37df7ef7c
@ -51,14 +51,14 @@ public class AdminGetRankCommand extends CompositeCommand {
|
|||||||
user.sendMessage("general.errors.unknown-player");
|
user.sendMessage("general.errors.unknown-player");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!getPlugin().getIslands().hasIsland(getWorld(), targetUUID)) {
|
if (!getIslands().hasIsland(getWorld(), targetUUID)) {
|
||||||
user.sendMessage("general.errors.player-has-no-island");
|
user.sendMessage("general.errors.player-has-no-island");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// Get rank
|
// Get rank
|
||||||
RanksManager rm = getPlugin().getRanksManager();
|
RanksManager rm = getPlugin().getRanksManager();
|
||||||
User target = User.getInstance(targetUUID);
|
User target = User.getInstance(targetUUID);
|
||||||
Island island = getPlugin().getIslands().getIsland(getWorld(), targetUUID);
|
Island island = getIslands().getIsland(getWorld(), targetUUID);
|
||||||
int currentRank = island.getRank(target);
|
int currentRank = island.getRank(target);
|
||||||
user.sendMessage("commands.admin.getrank.rank-is", TextVariables.RANK, user.getTranslation(rm.getRank(currentRank)));
|
user.sendMessage("commands.admin.getrank.rank-is", TextVariables.RANK, user.getTranslation(rm.getRank(currentRank)));
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user