This commit is contained in:
T00thpick1 2013-03-08 22:03:00 -05:00 committed by NuclearW
parent 1b17b90f32
commit 7294175d9c
2 changed files with 15 additions and 4 deletions

View File

@ -1,5 +1,6 @@
package com.gmail.nossr50.commands.player;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
@ -122,8 +123,13 @@ public class McrankCommand implements CommandExecutor {
}
private void sqlDisplay(CommandSender sender, String playerName) {
if (mcMMO.queueManager.contains(sender.getName()) || !mcMMO.queueManager.queue(new McRankAsync(playerName, sender))) {
//Warn that queue is unable to accept
//TODO: Localize messages
if (mcMMO.queueManager.contains(sender.getName())) {
sender.sendMessage(ChatColor.RED + "Please wait for your previous command to process");
}
if (!mcMMO.queueManager.queue(new McRankAsync(playerName, sender))) {
// This will only run if for some reason it is unable to add to the queue
sender.sendMessage(ChatColor.RED + "Unable to add to queue.");
}
}
}

View File

@ -123,8 +123,13 @@ public class MctopCommand implements CommandExecutor {
}
private void sqlDisplay(int page, String query, CommandSender sender) {
if (mcMMO.queueManager.contains(sender.getName()) || !mcMMO.queueManager.queue(new McTopAsync(page, query, sender))) {
//Warn that queue is unable to accept
//TODO: Localize messages
if (mcMMO.queueManager.contains(sender.getName())) {
sender.sendMessage(ChatColor.RED + "Please wait for your previous command to process");
}
if (!mcMMO.queueManager.queue(new McTopAsync(page, query, sender))) {
// This will only run if for some reason it is unable to add to the queue
sender.sendMessage(ChatColor.RED + "Unable to add to queue.");
}
}
}