@@ -0,0 +1,2245 @@
+/*%0A * Copyright (c) 2017 Josh%0A *%0A * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the %22Software%22), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:%0A *%0A * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.%0A *%0A * THE SOFTWARE IS PROVIDED %22AS IS%22, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.%0A */%0A%0Apackage me.jdog.murapi.api.cmd;%0A%0Aimport org.bukkit.command.Command;%0Aimport org.bukkit.command.CommandExecutor;%0Aimport org.bukkit.command.CommandSender;%0Aimport org.bukkit.plugin.java.JavaPlugin;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0A/**%0A * Created by Muricans on 12/7/16.%0A */%0Apublic class CMDManager implements CommandExecutor %7B%0A    private static List%3CCMD%3E cmdBaseMap = new ArrayList%3C%3E();%0A%0A    public CMDManager() %7B%0A%0A    %7D%0A%0A    /**%0A     * Side notes: You no longer need to do mainclass.getCommand(cmdName).setExecutor(new CMDManager());%0A     * @param cmd The command.%0A     * @param plugin Class extending JavaPlugin.%0A     */%0A    public static void registerCommand(CMD cmd, JavaPlugin plugin) %7B%0A        cmdBaseMap.add(cmd);%0A        plugin.getCommand(cmd.getName()).setExecutor(new CMDManager());%0A    %7D%0A%0A    @Override%0A    public boolean onCommand(CommandSender sender, Command command, String label, String%5B%5D args) %7B%0A        for (CMD c : cmdBaseMap) %7B%0A            if (command.getName().equalsIgnoreCase(c.getName())) %7B%0A                c.execute(sender, command, label, args);%0A                return true;%0A            %7D%0A        %7D%0A        return true;%0A    %7D%0A%7D%0A

Create CMDManagerTest.java