From 02803a86e28b949fd8f8a8a47b73a81ae702790b Mon Sep 17 00:00:00 2001 From: alisolarflare Date: Thu, 15 Dec 2016 18:37:16 -0500 Subject: [PATCH] Adjusted Commands --- plugin.yml | 2 +- pom.xml | 27 ------------------- .../alipresents/architecture/Component.java | 5 ++-- .../architecture/commands/BaseCommand.java | 4 ++- .../architecture/commands/PlayerCommand.java | 7 +++++ .../graveyard/shulker/AliShulkerModule.java | 3 +-- 6 files changed, 15 insertions(+), 33 deletions(-) diff --git a/plugin.yml b/plugin.yml index 34fe825..f2f172d 100644 --- a/plugin.yml +++ b/plugin.yml @@ -1,4 +1,4 @@ -main: buttondevteam.AliPresents +main: buttondevteam.alipresents.AliPresents name: AliPresents version: 2.0.2 diff --git a/pom.xml b/pom.xml index 68e3c9f..d4c8311 100644 --- a/pom.xml +++ b/pom.xml @@ -31,33 +31,6 @@ 1.8 - - org.apache.maven.plugins - maven-shade-plugin - 2.4.2 - - - package - - shade - - - - - org.spigotmc:spigot-api - com.github.TBMCPlugins.ButtonCore:ButtonCore - net.ess3:Essentials - - - - - - - - - - - org.apache.maven.plugins maven-resources-plugin diff --git a/src/buttondevteam/alipresents/architecture/Component.java b/src/buttondevteam/alipresents/architecture/Component.java index 81b2f35..a08bee6 100644 --- a/src/buttondevteam/alipresents/architecture/Component.java +++ b/src/buttondevteam/alipresents/architecture/Component.java @@ -4,9 +4,9 @@ import org.bukkit.configuration.file.FileConfiguration; import org.bukkit.event.Listener; import org.bukkit.plugin.java.JavaPlugin; +import buttondevteam.alipresents.architecture.commands.BaseCommand; import buttondevteam.lib.TBMCCoreAPI; import buttondevteam.lib.chat.TBMCChatAPI; -import buttondevteam.lib.chat.TBMCCommandBase; /** * A Module class allows the compacting of projects into one single package. @@ -35,8 +35,9 @@ public abstract class Component{ * @param label Name of the command in plugin.yml * @param commandExecutor Custom coded CommandExecutor class */ - protected void registerCommand(JavaPlugin plugin, TBMCCommandBase commandBase){ + protected void registerCommand(JavaPlugin plugin, BaseCommand commandBase){ TBMCChatAPI.AddCommand(plugin, commandBase); + //plugin.getCommand(commandBase.getClass().getSimpleName().toString()).setExecutor(commandBase); } /** * Registers a Listener to this plugin diff --git a/src/buttondevteam/alipresents/architecture/commands/BaseCommand.java b/src/buttondevteam/alipresents/architecture/commands/BaseCommand.java index 0f8e89a..6233d3a 100644 --- a/src/buttondevteam/alipresents/architecture/commands/BaseCommand.java +++ b/src/buttondevteam/alipresents/architecture/commands/BaseCommand.java @@ -1,6 +1,8 @@ package buttondevteam.alipresents.architecture.commands; +import org.bukkit.command.CommandExecutor; + import buttondevteam.lib.chat.TBMCCommandBase; -public abstract class BaseCommand extends TBMCCommandBase{ +public abstract class BaseCommand extends TBMCCommandBase implements CommandExecutor{ } diff --git a/src/buttondevteam/alipresents/architecture/commands/PlayerCommand.java b/src/buttondevteam/alipresents/architecture/commands/PlayerCommand.java index 3812448..35d81bd 100644 --- a/src/buttondevteam/alipresents/architecture/commands/PlayerCommand.java +++ b/src/buttondevteam/alipresents/architecture/commands/PlayerCommand.java @@ -1,9 +1,16 @@ package buttondevteam.alipresents.architecture.commands; +import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; public abstract class PlayerCommand extends BaseCommand{ + /**replaces CommandExecutor functionality*/ + @Override + public boolean onCommand(CommandSender commandSender, Command command, String string, String[] args){ + return OnCommand(commandSender, string, args); + } + /**replaces TBMCCommandBase functionality*/ @Override public boolean OnCommand(CommandSender sender, String alias, String[] args){ return OnCommand((Player) sender, alias, args); diff --git a/src/buttondevteam/alipresents/graveyard/shulker/AliShulkerModule.java b/src/buttondevteam/alipresents/graveyard/shulker/AliShulkerModule.java index 83b006a..0241e32 100644 --- a/src/buttondevteam/alipresents/graveyard/shulker/AliShulkerModule.java +++ b/src/buttondevteam/alipresents/graveyard/shulker/AliShulkerModule.java @@ -3,14 +3,13 @@ package buttondevteam.alipresents.graveyard.shulker; import org.bukkit.plugin.java.JavaPlugin; import buttondevteam.alipresents.architecture.Component; -import buttondevteam.alipresents.graveyard.shulker.commands.AliShulker; /**@deprecated*/ public class AliShulkerModule extends Component { @Override public void register(JavaPlugin plugin) { - registerCommand(plugin, new AliShulker()); + //registerCommand(plugin, new AliShulker()); } }