diff --git a/src/main/java/com/gmail/nossr50/runnables/commands/McrankCommandDisplayTask.java b/src/main/java/com/gmail/nossr50/runnables/commands/McrankCommandDisplayTask.java index afbfea0c7..0f933fe44 100644 --- a/src/main/java/com/gmail/nossr50/runnables/commands/McrankCommandDisplayTask.java +++ b/src/main/java/com/gmail/nossr50/runnables/commands/McrankCommandDisplayTask.java @@ -37,6 +37,7 @@ public class McrankCommandDisplayTask extends BukkitRunnable { if (useChat) { displayChat(); } + ((Player) sender).removeMetadata(mcMMO.databaseCommandKey, mcMMO.p); } private void displayChat() { @@ -57,7 +58,6 @@ public class McrankCommandDisplayTask extends BukkitRunnable { rank = skills.get(null); sender.sendMessage(LocaleLoader.getString("Commands.mcrank.Overall", (rank == null ? LocaleLoader.getString("Commands.mcrank.Unranked") : rank))); - player.removeMetadata(mcMMO.databaseCommandKey, mcMMO.p); } public void displayBoard() { diff --git a/src/main/java/com/gmail/nossr50/runnables/commands/MctopCommandDisplayTask.java b/src/main/java/com/gmail/nossr50/runnables/commands/MctopCommandDisplayTask.java index bdc4ba455..b7c63199b 100644 --- a/src/main/java/com/gmail/nossr50/runnables/commands/MctopCommandDisplayTask.java +++ b/src/main/java/com/gmail/nossr50/runnables/commands/MctopCommandDisplayTask.java @@ -42,6 +42,9 @@ public class MctopCommandDisplayTask extends BukkitRunnable { displayChat(); } + if (sender instanceof Player) { + ((Player) sender).removeMetadata(mcMMO.databaseCommandKey, mcMMO.p); + } sender.sendMessage(LocaleLoader.getString("Commands.mctop.Tip")); } @@ -62,9 +65,6 @@ public class MctopCommandDisplayTask extends BukkitRunnable { sender.sendMessage(String.format("%2d. %s%s - %s%s", place, ChatColor.GREEN, stat.name, ChatColor.WHITE, stat.statVal)); place++; } - if (sender instanceof Player) { - ((Player) sender).removeMetadata(mcMMO.databaseCommandKey, mcMMO.p); - } } private void displayBoard() {