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 {
private final Quests plugin;
public HashMap<String, Integer> commands = new HashMap<String, Integer>();
public HashMap<String, Integer> adminCommands = new HashMap<String, Integer>();
private Map<String, Integer> commands = new HashMap<String, Integer>();
private Map<String, Integer> adminCommands = new HashMap<String, Integer>();
public CmdExecutor(Quests plugin) {
this.plugin = plugin;
@ -146,6 +146,14 @@ public class CmdExecutor implements CommandExecutor {
}
}
public Map<String, Integer> getCommands() {
return commands;
}
public Map<String, Integer> getAdminCommands() {
return adminCommands;
}
public String checkCommand(String cmd, String[] args) {
if (cmd.equalsIgnoreCase("quest") || args.length == 0) {
return null;