mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 13:16:45 +01:00
Fixed bug where processing message would always get displayed
and the player could never execute /mctop or /mcrank if chat display was disabled.
This commit is contained in:
parent
48d3280e5e
commit
7da661546f
@ -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() {
|
||||
|
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user