mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-29 16:46:46 +01:00
Messages
This commit is contained in:
parent
1b17b90f32
commit
7294175d9c
@ -1,5 +1,6 @@
|
|||||||
package com.gmail.nossr50.commands.player;
|
package com.gmail.nossr50.commands.player;
|
||||||
|
|
||||||
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
@ -122,8 +123,13 @@ public class McrankCommand implements CommandExecutor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void sqlDisplay(CommandSender sender, String playerName) {
|
private void sqlDisplay(CommandSender sender, String playerName) {
|
||||||
if (mcMMO.queueManager.contains(sender.getName()) || !mcMMO.queueManager.queue(new McRankAsync(playerName, sender))) {
|
//TODO: Localize messages
|
||||||
//Warn that queue is unable to accept
|
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.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -123,8 +123,13 @@ public class MctopCommand implements CommandExecutor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void sqlDisplay(int page, String query, CommandSender sender) {
|
private void sqlDisplay(int page, String query, CommandSender sender) {
|
||||||
if (mcMMO.queueManager.contains(sender.getName()) || !mcMMO.queueManager.queue(new McTopAsync(page, query, sender))) {
|
//TODO: Localize messages
|
||||||
//Warn that queue is unable to accept
|
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.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user