From b37df7ef7ca7a03271c17a59709b1e61fb72f739 Mon Sep 17 00:00:00 2001 From: Florian CUNY Date: Thu, 19 Jul 2018 12:22:36 +0200 Subject: [PATCH] Fixed some code smells in AdminGetRankCommand --- .../bskyblock/commands/admin/AdminGetRankCommand.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/us/tastybento/bskyblock/commands/admin/AdminGetRankCommand.java b/src/main/java/us/tastybento/bskyblock/commands/admin/AdminGetRankCommand.java index c97fd1741..ab38bf879 100644 --- a/src/main/java/us/tastybento/bskyblock/commands/admin/AdminGetRankCommand.java +++ b/src/main/java/us/tastybento/bskyblock/commands/admin/AdminGetRankCommand.java @@ -51,14 +51,14 @@ public class AdminGetRankCommand extends CompositeCommand { user.sendMessage("general.errors.unknown-player"); return false; } - if (!getPlugin().getIslands().hasIsland(getWorld(), targetUUID)) { + if (!getIslands().hasIsland(getWorld(), targetUUID)) { user.sendMessage("general.errors.player-has-no-island"); return false; } // Get rank RanksManager rm = getPlugin().getRanksManager(); - User target = User.getInstance(targetUUID); - Island island = getPlugin().getIslands().getIsland(getWorld(), targetUUID); + User target = User.getInstance(targetUUID); + Island island = getIslands().getIsland(getWorld(), targetUUID); int currentRank = island.getRank(target); user.sendMessage("commands.admin.getrank.rank-is", TextVariables.RANK, user.getTranslation(rm.getRank(currentRank))); return true;