Adjusted Commands

This commit is contained in:
alisolarflare 2016-12-15 18:37:16 -05:00
parent fe2a034429
commit 02803a86e2
6 changed files with 15 additions and 33 deletions

View file

@ -1,4 +1,4 @@
main: buttondevteam.AliPresents
main: buttondevteam.alipresents.AliPresents
name: AliPresents
version: 2.0.2

27
pom.xml
View file

@ -31,33 +31,6 @@
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.4.2</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<artifactSet>
<excludes>
<exclude>org.spigotmc:spigot-api</exclude>
<exclude>com.github.TBMCPlugins.ButtonCore:ButtonCore</exclude>
<exclude>net.ess3:Essentials</exclude>
</excludes> <!-- TODO: http://stackoverflow.com/questions/28458058/maven-shade-plugin-exclude-a-dependency-and-all-its-transitive-dependencies -->
</artifactSet>
<pluginExecution>
<action>
<execute />
</action>
</pluginExecution>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>

View file

@ -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

View file

@ -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{
}

View file

@ -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);

View file

@ -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());
}
}