mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 15: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) {
|
if (useChat) {
|
||||||
displayChat();
|
displayChat();
|
||||||
}
|
}
|
||||||
|
((Player) sender).removeMetadata(mcMMO.databaseCommandKey, mcMMO.p);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void displayChat() {
|
private void displayChat() {
|
||||||
@ -57,7 +58,6 @@ public class McrankCommandDisplayTask extends BukkitRunnable {
|
|||||||
|
|
||||||
rank = skills.get(null);
|
rank = skills.get(null);
|
||||||
sender.sendMessage(LocaleLoader.getString("Commands.mcrank.Overall", (rank == null ? LocaleLoader.getString("Commands.mcrank.Unranked") : rank)));
|
sender.sendMessage(LocaleLoader.getString("Commands.mcrank.Overall", (rank == null ? LocaleLoader.getString("Commands.mcrank.Unranked") : rank)));
|
||||||
player.removeMetadata(mcMMO.databaseCommandKey, mcMMO.p);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void displayBoard() {
|
public void displayBoard() {
|
||||||
|
@ -42,6 +42,9 @@ public class MctopCommandDisplayTask extends BukkitRunnable {
|
|||||||
displayChat();
|
displayChat();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (sender instanceof Player) {
|
||||||
|
((Player) sender).removeMetadata(mcMMO.databaseCommandKey, mcMMO.p);
|
||||||
|
}
|
||||||
sender.sendMessage(LocaleLoader.getString("Commands.mctop.Tip"));
|
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));
|
sender.sendMessage(String.format("%2d. %s%s - %s%s", place, ChatColor.GREEN, stat.name, ChatColor.WHITE, stat.statVal));
|
||||||
place++;
|
place++;
|
||||||
}
|
}
|
||||||
if (sender instanceof Player) {
|
|
||||||
((Player) sender).removeMetadata(mcMMO.databaseCommandKey, mcMMO.p);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void displayBoard() {
|
private void displayBoard() {
|
||||||
|
Loading…
Reference in New Issue
Block a user