Add getter methods to command listener

This commit is contained in:
PikaMug 2020-04-08 02:05:47 -04:00
parent 68e99ac96f
commit 588902e81c

View File

@ -58,8 +58,8 @@ import org.bukkit.inventory.meta.ItemMeta;
public class CmdExecutor implements CommandExecutor { public class CmdExecutor implements CommandExecutor {
private final Quests plugin; private final Quests plugin;
public HashMap<String, Integer> commands = new HashMap<String, Integer>(); private Map<String, Integer> commands = new HashMap<String, Integer>();
public HashMap<String, Integer> adminCommands = new HashMap<String, Integer>(); private Map<String, Integer> adminCommands = new HashMap<String, Integer>();
public CmdExecutor(Quests plugin) { public CmdExecutor(Quests plugin) {
this.plugin = plugin; this.plugin = plugin;
@ -145,6 +145,14 @@ public class CmdExecutor implements CommandExecutor {
adminCommands.put("reload", 1); // reload adminCommands.put("reload", 1); // reload
} }
} }
public Map<String, Integer> getCommands() {
return commands;
}
public Map<String, Integer> getAdminCommands() {
return adminCommands;
}
public String checkCommand(String cmd, String[] args) { public String checkCommand(String cmd, String[] args) {
if (cmd.equalsIgnoreCase("quest") || args.length == 0) { if (cmd.equalsIgnoreCase("quest") || args.length == 0) {