Only display hook info when debug is enabled.

Add displayName to test command.
This commit is contained in:
cnaude 2015-04-18 11:34:13 -07:00
parent 10ec37c06b
commit b30654daed
2 changed files with 5 additions and 2 deletions

View File

@ -49,13 +49,14 @@ public class Test implements IRCCommandInterface {
public void dispatch(CommandSender sender, String[] args) { public void dispatch(CommandSender sender, String[] args) {
//irc test <username> //irc test <username>
if (plugin.vaultHelpers == null) { if (plugin.vaultHelpers == null) {
sender.sendMessage(ChatColor.RED + "Vault is no enabled!"); sender.sendMessage(ChatColor.RED + "Vault is not enabled!");
return; return;
} }
if (plugin.debugMode()) { if (plugin.debugMode()) {
if (args.length >= 2) { if (args.length >= 2) {
String playername = args[1]; String playername = args[1];
sender.sendMessage(ChatColor.LIGHT_PURPLE + "Testing " + playername); sender.sendMessage(ChatColor.LIGHT_PURPLE + "Testing " + playername);
sender.sendMessage("displayName : " + plugin.getDisplayName(name));
sender.sendMessage("getGroupPrefix : " + plugin.getGroupPrefix(plugin.defaultPlayerWorld, playername)); sender.sendMessage("getGroupPrefix : " + plugin.getGroupPrefix(plugin.defaultPlayerWorld, playername));
sender.sendMessage("getGroupSuffix : " + plugin.getGroupSuffix(plugin.defaultPlayerWorld, playername)); sender.sendMessage("getGroupSuffix : " + plugin.getGroupSuffix(plugin.defaultPlayerWorld, playername));
sender.sendMessage("getPlayerPrefix : " + plugin.getPlayerPrefix(plugin.defaultPlayerWorld, playername)); sender.sendMessage("getPlayerPrefix : " + plugin.getPlayerPrefix(plugin.defaultPlayerWorld, playername));

View File

@ -272,7 +272,9 @@ public class PurpleIRC extends JavaPlugin {
getServer().getPluginManager().registerEvents(new GamePlayerQuitListener(this), this); getServer().getPluginManager().registerEvents(new GamePlayerQuitListener(this), this);
getServer().getPluginManager().registerEvents(new GameServerCommandListener(this), this); getServer().getPluginManager().registerEvents(new GameServerCommandListener(this), this);
detectHooks(); detectHooks();
if (debugEnabled) {
getPurpleHooks(getServer().getConsoleSender(), false); getPurpleHooks(getServer().getConsoleSender(), false);
}
commandHandlers = new CommandHandlers(this); commandHandlers = new CommandHandlers(this);
ircTabCompleter = new PurpleTabCompleter(this); ircTabCompleter = new PurpleTabCompleter(this);
getCommand("irc").setExecutor(commandHandlers); getCommand("irc").setExecutor(commandHandlers);