From 6817a076cb37ba478db4e36d4a66d7fc42349ca7 Mon Sep 17 00:00:00 2001 From: alisolarflare Date: Fri, 11 Nov 2016 14:06:15 -0500 Subject: [PATCH] Revert "Ugly change" This reverts commit e75428f7183d65ef3f509de29d20550db29f2efa. --- src/alisolarflare/DevCommand.java | 4 +--- src/alisolarflare/Module.java | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/alisolarflare/DevCommand.java b/src/alisolarflare/DevCommand.java index 9a01eed..a4c5091 100644 --- a/src/alisolarflare/DevCommand.java +++ b/src/alisolarflare/DevCommand.java @@ -1,11 +1,10 @@ package alisolarflare; -import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; import buttondevteam.lib.chat.TBMCCommandBase; -public abstract class DevCommand extends TBMCCommandBase implements CommandExecutor{ +public abstract class DevCommand extends TBMCCommandBase{ @Override public abstract boolean OnCommand(CommandSender sender, String alias, String[] args); @@ -13,7 +12,6 @@ public abstract class DevCommand extends TBMCCommandBase implements CommandExecu @Override public abstract String[] GetHelpText(String alias); - public abstract String GetLabel(); @Override public boolean GetPlayerOnly() { // TODO Auto-generated method stub diff --git a/src/alisolarflare/Module.java b/src/alisolarflare/Module.java index c2a20f4..3fe900b 100644 --- a/src/alisolarflare/Module.java +++ b/src/alisolarflare/Module.java @@ -33,8 +33,8 @@ public abstract class Module{ * @param label Name of the command in plugin.yml * @param commandExecutor Custom coded CommandExecutor class */ - protected void registerCommand(JavaPlugin plugin, DevCommand devCommand){ - plugin.getCommand(devCommand.GetLabel()).setExecutor(devCommand); + protected void registerCommand(JavaPlugin plugin, TBMCCommandBase commandBase){ + TBMCChatAPI.AddCommand(plugin, commandBase); } /** * Registers a Listener to this plugin