Finally finished first wave of bugfixing #35
3 changed files with 53 additions and 51 deletions
|
@ -21,7 +21,6 @@ import buttondevteam.lib.chat.TBMCChatAPI;
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public abstract class Component{
|
public abstract class Component{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Registers the module, when called by the JavaPlugin class. Call
|
* Registers the module, when called by the JavaPlugin class. Call
|
||||||
* registerCommand() and registerListener() within this method.
|
* registerCommand() and registerListener() within this method.
|
||||||
|
|
|
@ -3,7 +3,7 @@ package buttondevteam.alipresents.components.gpower;
|
||||||
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.components.gpower.commands.GPower;
|
import buttondevteam.alipresents.components.gpower.commands.Test;
|
||||||
import buttondevteam.alipresents.components.gpower.enchant.EnchantingLoop;
|
import buttondevteam.alipresents.components.gpower.enchant.EnchantingLoop;
|
||||||
import buttondevteam.alipresents.components.gpower.powerstate.PowerDown;
|
import buttondevteam.alipresents.components.gpower.powerstate.PowerDown;
|
||||||
import buttondevteam.alipresents.components.gpower.powerstate.PowerUp;
|
import buttondevteam.alipresents.components.gpower.powerstate.PowerUp;
|
||||||
|
@ -12,7 +12,7 @@ public class GPowerComponent extends Component {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void register(JavaPlugin plugin) {
|
public void register(JavaPlugin plugin) {
|
||||||
registerCommand(plugin, new GPower());
|
registerCommand(plugin, new Test());
|
||||||
registerCommand(plugin, new PowerUp());
|
registerCommand(plugin, new PowerUp());
|
||||||
registerCommand(plugin, new PowerDown());
|
registerCommand(plugin, new PowerDown());
|
||||||
|
|
||||||
|
|
|
@ -2,16 +2,13 @@ package buttondevteam.alipresents.components.gpower.commands;
|
||||||
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import buttondevteam.alipresents.architecture.commands.PlayerCommand;
|
import buttondevteam.alipresents.architecture.commands.ModCommand;
|
||||||
import buttondevteam.alipresents.components.gpower.api.GPowerAPI;
|
import buttondevteam.alipresents.components.gpower.api.GPowerAPI;
|
||||||
|
|
||||||
public class GPower extends PlayerCommand {
|
public class Test extends ModCommand{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String GetCommandPath() {
|
public boolean OnCommand(Player player, String alias, String[] args) {
|
||||||
return "gpower";
|
|
||||||
}
|
|
||||||
@Override
|
|
||||||
public boolean OnCommand(Player player, String label, String[] args) {
|
|
||||||
if (args.length < 2) {
|
if (args.length < 2) {
|
||||||
player.sendMessage("Proper Usage to test G-Powers:");
|
player.sendMessage("Proper Usage to test G-Powers:");
|
||||||
player.sendMessage("/gpowertest [colour=red,orange,yellow,green,blue,purple] [active=true/false]");
|
player.sendMessage("/gpowertest [colour=red,orange,yellow,green,blue,purple] [active=true/false]");
|
||||||
|
@ -40,9 +37,15 @@ public class GPower extends PlayerCommand {
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
public String GetCommandPath() {
|
||||||
|
return "gpower test";
|
||||||
|
}
|
||||||
|
@Override
|
||||||
public String[] GetHelpText(String alias){
|
public String[] GetHelpText(String alias){
|
||||||
return new String[]{
|
return new String[]{
|
||||||
"Usage: /gpowertest [colour=red,orange,yellow,green,blue,purple,grey] [active=true/false]"
|
"Usage: /gpowertest [colour=red,orange,yellow,green,blue,purple,grey] [active=true/false]"
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in a new issue