Adjusted Commands
This commit is contained in:
parent
fe2a034429
commit
02803a86e2
6 changed files with 15 additions and 33 deletions
|
@ -1,4 +1,4 @@
|
||||||
main: buttondevteam.AliPresents
|
main: buttondevteam.alipresents.AliPresents
|
||||||
name: AliPresents
|
name: AliPresents
|
||||||
version: 2.0.2
|
version: 2.0.2
|
||||||
|
|
||||||
|
|
27
pom.xml
27
pom.xml
|
@ -31,33 +31,6 @@
|
||||||
<target>1.8</target>
|
<target>1.8</target>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</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>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-resources-plugin</artifactId>
|
<artifactId>maven-resources-plugin</artifactId>
|
||||||
|
|
|
@ -4,9 +4,9 @@ import org.bukkit.configuration.file.FileConfiguration;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
|
import buttondevteam.alipresents.architecture.commands.BaseCommand;
|
||||||
import buttondevteam.lib.TBMCCoreAPI;
|
import buttondevteam.lib.TBMCCoreAPI;
|
||||||
import buttondevteam.lib.chat.TBMCChatAPI;
|
import buttondevteam.lib.chat.TBMCChatAPI;
|
||||||
import buttondevteam.lib.chat.TBMCCommandBase;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A Module class allows the compacting of projects into one single package.
|
* 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 label Name of the command in plugin.yml
|
||||||
* @param commandExecutor Custom coded CommandExecutor class
|
* @param commandExecutor Custom coded CommandExecutor class
|
||||||
*/
|
*/
|
||||||
protected void registerCommand(JavaPlugin plugin, TBMCCommandBase commandBase){
|
protected void registerCommand(JavaPlugin plugin, BaseCommand commandBase){
|
||||||
TBMCChatAPI.AddCommand(plugin, commandBase);
|
TBMCChatAPI.AddCommand(plugin, commandBase);
|
||||||
|
//plugin.getCommand(commandBase.getClass().getSimpleName().toString()).setExecutor(commandBase);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Registers a Listener to this plugin
|
* Registers a Listener to this plugin
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
package buttondevteam.alipresents.architecture.commands;
|
package buttondevteam.alipresents.architecture.commands;
|
||||||
|
|
||||||
|
import org.bukkit.command.CommandExecutor;
|
||||||
|
|
||||||
import buttondevteam.lib.chat.TBMCCommandBase;
|
import buttondevteam.lib.chat.TBMCCommandBase;
|
||||||
|
|
||||||
public abstract class BaseCommand extends TBMCCommandBase{
|
public abstract class BaseCommand extends TBMCCommandBase implements CommandExecutor{
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,16 @@
|
||||||
package buttondevteam.alipresents.architecture.commands;
|
package buttondevteam.alipresents.architecture.commands;
|
||||||
|
|
||||||
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
public abstract class PlayerCommand extends BaseCommand{
|
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
|
@Override
|
||||||
public boolean OnCommand(CommandSender sender, String alias, String[] args){
|
public boolean OnCommand(CommandSender sender, String alias, String[] args){
|
||||||
return OnCommand((Player) sender, alias, args);
|
return OnCommand((Player) sender, alias, args);
|
||||||
|
|
|
@ -3,14 +3,13 @@ package buttondevteam.alipresents.graveyard.shulker;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
import buttondevteam.alipresents.architecture.Component;
|
import buttondevteam.alipresents.architecture.Component;
|
||||||
import buttondevteam.alipresents.graveyard.shulker.commands.AliShulker;
|
|
||||||
|
|
||||||
/**@deprecated*/
|
/**@deprecated*/
|
||||||
public class AliShulkerModule extends Component {
|
public class AliShulkerModule extends Component {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void register(JavaPlugin plugin) {
|
public void register(JavaPlugin plugin) {
|
||||||
registerCommand(plugin, new AliShulker());
|
//registerCommand(plugin, new AliShulker());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue