From e2f2c6635211dbdd48ae6430375628d17a37a953 Mon Sep 17 00:00:00 2001 From: alisolarflare Date: Fri, 16 Dec 2016 12:51:46 -0500 Subject: [PATCH 1/6] Started work on sub-commands --- pom.xml | 32 +++++++++---------- .../commands/subcommands/SubCommand.java | 12 ++++++- .../components/alilinks/commands/Press.java | 32 +++++++++++++++++++ .../components/alilinks/commands/Set.java | 14 ++++++++ 4 files changed, 73 insertions(+), 17 deletions(-) create mode 100644 src/buttondevteam/alipresents/components/alilinks/commands/Press.java create mode 100644 src/buttondevteam/alipresents/components/alilinks/commands/Set.java diff --git a/pom.xml b/pom.xml index d4c8311..8a031d8 100644 --- a/pom.xml +++ b/pom.xml @@ -73,13 +73,13 @@ https://jitpack.io - ess-repo - http://repo.ess3.net/content/groups/essentials - - - citizensnpcs - http://repo.citizensnpcs.co/ - + ess-repo + http://repo.ess3.net/content/groups/essentials + + + citizensnpcs + http://repo.citizensnpcs.co/ + @@ -100,14 +100,14 @@ master-SNAPSHOT - net.ess3 - Essentials - 2.14-SNAPSHOT - - - net.citizensnpcs - citizens-v1_11_R1 - 2.0.21-SNAPSHOT - + net.ess3 + Essentials + 2.14-SNAPSHOT + + + net.citizensnpcs + citizens-v1_11_R1 + 2.0.21-SNAPSHOT + diff --git a/src/buttondevteam/alipresents/architecture/commands/subcommands/SubCommand.java b/src/buttondevteam/alipresents/architecture/commands/subcommands/SubCommand.java index 8a6a93d..9501bef 100644 --- a/src/buttondevteam/alipresents/architecture/commands/subcommands/SubCommand.java +++ b/src/buttondevteam/alipresents/architecture/commands/subcommands/SubCommand.java @@ -1,9 +1,19 @@ package buttondevteam.alipresents.architecture.commands.subcommands; +import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; public abstract class SubCommand { - public abstract boolean run(Player player, String label, String[] args); + public boolean run(CommandSender sender, String label, String[] args){ + if (getPlayerOnly() && (sender instanceof Player)) + return false; + + if (getModOnly() && (sender.hasPermission("Moderator"))) + return false; + + return onCommand((Player) sender, label, args); + } + protected abstract boolean onCommand(Player player, String label, String[] args); public abstract boolean getPlayerOnly(); public abstract boolean getModOnly(); public abstract String[] GetHelpText(String alias); diff --git a/src/buttondevteam/alipresents/components/alilinks/commands/Press.java b/src/buttondevteam/alipresents/components/alilinks/commands/Press.java new file mode 100644 index 0000000..a1ad580 --- /dev/null +++ b/src/buttondevteam/alipresents/components/alilinks/commands/Press.java @@ -0,0 +1,32 @@ +package buttondevteam.alipresents.components.alilinks.commands; + +import org.bukkit.entity.Player; + +import buttondevteam.alipresents.architecture.commands.subcommands.SubCommand; + +public class Press extends SubCommand{ + + @Override + protected boolean onCommand(Player player, String label, String[] args) { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean getPlayerOnly() { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean getModOnly() { + // TODO Auto-generated method stub + return false; + } + + @Override + public String[] GetHelpText(String alias) { + // TODO Auto-generated method stub + return null; + } +} diff --git a/src/buttondevteam/alipresents/components/alilinks/commands/Set.java b/src/buttondevteam/alipresents/components/alilinks/commands/Set.java new file mode 100644 index 0000000..38fdc99 --- /dev/null +++ b/src/buttondevteam/alipresents/components/alilinks/commands/Set.java @@ -0,0 +1,14 @@ +package buttondevteam.alipresents.components.alilinks.commands; + +import org.bukkit.entity.Player; + +import buttondevteam.alipresents.architecture.commands.ModCommand; + +public class Set extends ModCommand{ + @Override + public boolean OnCommand(Player player, String alias, String[] args) { + // TODO Auto-generated method stub + return false; + } + +} From 7af3544c6162ec3e29094434b9e8d8e2cba8e4bb Mon Sep 17 00:00:00 2001 From: alisolarflare Date: Fri, 16 Dec 2016 13:39:26 -0500 Subject: [PATCH 2/6] Broke AliLink --- .../commands/subcommands/ModSubCommand.java | 15 ---------- .../subcommands/PlayerSubCommand.java | 16 ---------- .../commands/subcommands/SubCommand.java | 20 ------------- .../components/alilinks/commands/AliLink.java | 30 ++++++++++++++++--- .../components/alilinks/commands/Press.java | 24 ++------------- 5 files changed, 29 insertions(+), 76 deletions(-) delete mode 100644 src/buttondevteam/alipresents/architecture/commands/subcommands/ModSubCommand.java delete mode 100644 src/buttondevteam/alipresents/architecture/commands/subcommands/PlayerSubCommand.java delete mode 100644 src/buttondevteam/alipresents/architecture/commands/subcommands/SubCommand.java diff --git a/src/buttondevteam/alipresents/architecture/commands/subcommands/ModSubCommand.java b/src/buttondevteam/alipresents/architecture/commands/subcommands/ModSubCommand.java deleted file mode 100644 index 24ba0ee..0000000 --- a/src/buttondevteam/alipresents/architecture/commands/subcommands/ModSubCommand.java +++ /dev/null @@ -1,15 +0,0 @@ -package buttondevteam.alipresents.architecture.commands.subcommands; - -public abstract class ModSubCommand extends SubCommand{ - @Override - public boolean getPlayerOnly() { - // TODO Auto-generated method stub - return true; - } - - @Override - public boolean getModOnly() { - // TODO Auto-generated method stub - return true; - } -} diff --git a/src/buttondevteam/alipresents/architecture/commands/subcommands/PlayerSubCommand.java b/src/buttondevteam/alipresents/architecture/commands/subcommands/PlayerSubCommand.java deleted file mode 100644 index aa7a631..0000000 --- a/src/buttondevteam/alipresents/architecture/commands/subcommands/PlayerSubCommand.java +++ /dev/null @@ -1,16 +0,0 @@ -package buttondevteam.alipresents.architecture.commands.subcommands; - -public abstract class PlayerSubCommand extends SubCommand{ - @Override - public boolean getModOnly() { - // TODO Auto-generated method stub - return false; - } - - @Override - public boolean getPlayerOnly() { - // TODO Auto-generated method stub - return true; - } - -} diff --git a/src/buttondevteam/alipresents/architecture/commands/subcommands/SubCommand.java b/src/buttondevteam/alipresents/architecture/commands/subcommands/SubCommand.java deleted file mode 100644 index 9501bef..0000000 --- a/src/buttondevteam/alipresents/architecture/commands/subcommands/SubCommand.java +++ /dev/null @@ -1,20 +0,0 @@ -package buttondevteam.alipresents.architecture.commands.subcommands; - -import org.bukkit.command.CommandSender; -import org.bukkit.entity.Player; - -public abstract class SubCommand { - public boolean run(CommandSender sender, String label, String[] args){ - if (getPlayerOnly() && (sender instanceof Player)) - return false; - - if (getModOnly() && (sender.hasPermission("Moderator"))) - return false; - - return onCommand((Player) sender, label, args); - } - protected abstract boolean onCommand(Player player, String label, String[] args); - public abstract boolean getPlayerOnly(); - public abstract boolean getModOnly(); - public abstract String[] GetHelpText(String alias); -} diff --git a/src/buttondevteam/alipresents/components/alilinks/commands/AliLink.java b/src/buttondevteam/alipresents/components/alilinks/commands/AliLink.java index e5f9286..1886985 100644 --- a/src/buttondevteam/alipresents/components/alilinks/commands/AliLink.java +++ b/src/buttondevteam/alipresents/components/alilinks/commands/AliLink.java @@ -1,19 +1,21 @@ package buttondevteam.alipresents.components.alilinks.commands; +import org.bukkit.command.Command; +import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import org.bukkit.plugin.java.JavaPlugin; -import buttondevteam.alipresents.architecture.commands.PlayerCommand; +import buttondevteam.alipresents.architecture.commands.BaseCommand; import buttondevteam.alipresents.components.alilinks.AliLinkAPI; -public class AliLink extends PlayerCommand{ +public class AliLink extends BaseCommand{ private JavaPlugin plugin; public AliLink(JavaPlugin plugin) { this.plugin = plugin; } @Override - public boolean OnCommand(Player player, String alias, String[] inputFrequencies) { + public boolean OnCommand(CommandSender player, String alias, String[] inputFrequencies) { if(inputFrequencies.length < 1) return false; @@ -21,12 +23,32 @@ public class AliLink extends PlayerCommand{ case "press": return AliLinkAPI.sendPressEvent(player, inputFrequencies, plugin); case "set": - return AliLinkAPI.createAliLink(player, inputFrequencies); + return AliLinkAPI.createAliLink((Player) player, inputFrequencies); default: return false; } } + @Override + public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { + // TODO Auto-generated method stub + return false; + } + @Override + public String[] GetHelpText(String alias) { + // TODO Auto-generated method stub + return null; + } + @Override + public boolean GetPlayerOnly() { + // TODO Auto-generated method stub + return false; + } + @Override + public boolean GetModOnly() { + // TODO Auto-generated method stub + return false; + } diff --git a/src/buttondevteam/alipresents/components/alilinks/commands/Press.java b/src/buttondevteam/alipresents/components/alilinks/commands/Press.java index a1ad580..4b01942 100644 --- a/src/buttondevteam/alipresents/components/alilinks/commands/Press.java +++ b/src/buttondevteam/alipresents/components/alilinks/commands/Press.java @@ -2,31 +2,13 @@ package buttondevteam.alipresents.components.alilinks.commands; import org.bukkit.entity.Player; -import buttondevteam.alipresents.architecture.commands.subcommands.SubCommand; +import buttondevteam.alipresents.architecture.commands.PlayerCommand; -public class Press extends SubCommand{ +public class Press extends PlayerCommand{ @Override - protected boolean onCommand(Player player, String label, String[] args) { + public boolean OnCommand(Player player, String alias, String[] args) { // TODO Auto-generated method stub return false; } - - @Override - public boolean getPlayerOnly() { - // TODO Auto-generated method stub - return false; - } - - @Override - public boolean getModOnly() { - // TODO Auto-generated method stub - return false; - } - - @Override - public String[] GetHelpText(String alias) { - // TODO Auto-generated method stub - return null; - } } From ee2c29e1524c1ad00ff16f2011627519c7923742 Mon Sep 17 00:00:00 2001 From: NorbiPeti Date: Fri, 16 Dec 2016 20:23:15 +0100 Subject: [PATCH 3/6] Fixed /alilink --- .../architecture/commands/ModCommand.java | 1 - .../architecture/commands/PlayerCommand.java | 2 - .../components/alilinks/AliLinkComponent.java | 12 +++- .../components/alilinks/commands/AliLink.java | 56 ------------------- .../components/alilinks/commands/Press.java | 13 ++++- .../components/alilinks/commands/Set.java | 14 +++-- 6 files changed, 30 insertions(+), 68 deletions(-) delete mode 100644 src/buttondevteam/alipresents/components/alilinks/commands/AliLink.java diff --git a/src/buttondevteam/alipresents/architecture/commands/ModCommand.java b/src/buttondevteam/alipresents/architecture/commands/ModCommand.java index d0e4f03..c9d5d03 100644 --- a/src/buttondevteam/alipresents/architecture/commands/ModCommand.java +++ b/src/buttondevteam/alipresents/architecture/commands/ModCommand.java @@ -12,7 +12,6 @@ public abstract class ModCommand extends PlayerCommand{ @Override public boolean GetModOnly() { - // TODO Auto-generated method stub return true; } } diff --git a/src/buttondevteam/alipresents/architecture/commands/PlayerCommand.java b/src/buttondevteam/alipresents/architecture/commands/PlayerCommand.java index 35d81bd..fa0282d 100644 --- a/src/buttondevteam/alipresents/architecture/commands/PlayerCommand.java +++ b/src/buttondevteam/alipresents/architecture/commands/PlayerCommand.java @@ -18,13 +18,11 @@ public abstract class PlayerCommand extends BaseCommand{ public abstract boolean OnCommand(Player player, String alias, String[] args); @Override public boolean GetPlayerOnly() { - // TODO Auto-generated method stub return true; } @Override public boolean GetModOnly() { - // TODO Auto-generated method stub return false; } @Override diff --git a/src/buttondevteam/alipresents/components/alilinks/AliLinkComponent.java b/src/buttondevteam/alipresents/components/alilinks/AliLinkComponent.java index 508e894..9d91954 100644 --- a/src/buttondevteam/alipresents/components/alilinks/AliLinkComponent.java +++ b/src/buttondevteam/alipresents/components/alilinks/AliLinkComponent.java @@ -3,11 +3,19 @@ package buttondevteam.alipresents.components.alilinks; import org.bukkit.plugin.java.JavaPlugin; import buttondevteam.alipresents.architecture.Component; -import buttondevteam.alipresents.components.alilinks.commands.AliLink; +import buttondevteam.alipresents.components.alilinks.commands.Press; +import buttondevteam.alipresents.components.alilinks.commands.Set; public class AliLinkComponent extends Component { + private static JavaPlugin p; + + public static JavaPlugin getPlugin() { + return p; + } + @Override public void register(JavaPlugin plugin) { - registerCommand(plugin, new AliLink(plugin)); + registerCommand(p = plugin, new Press()); + registerCommand(plugin, new Set()); } } diff --git a/src/buttondevteam/alipresents/components/alilinks/commands/AliLink.java b/src/buttondevteam/alipresents/components/alilinks/commands/AliLink.java deleted file mode 100644 index 1886985..0000000 --- a/src/buttondevteam/alipresents/components/alilinks/commands/AliLink.java +++ /dev/null @@ -1,56 +0,0 @@ -package buttondevteam.alipresents.components.alilinks.commands; - -import org.bukkit.command.Command; -import org.bukkit.command.CommandSender; -import org.bukkit.entity.Player; -import org.bukkit.plugin.java.JavaPlugin; - -import buttondevteam.alipresents.architecture.commands.BaseCommand; -import buttondevteam.alipresents.components.alilinks.AliLinkAPI; - -public class AliLink extends BaseCommand{ - private JavaPlugin plugin; - - public AliLink(JavaPlugin plugin) { - this.plugin = plugin; - } - @Override - public boolean OnCommand(CommandSender player, String alias, String[] inputFrequencies) { - if(inputFrequencies.length < 1) - return false; - - switch (inputFrequencies[0].toLowerCase()){ - case "press": - return AliLinkAPI.sendPressEvent(player, inputFrequencies, plugin); - case "set": - return AliLinkAPI.createAliLink((Player) player, inputFrequencies); - default: - return false; - } - - } - @Override - public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { - // TODO Auto-generated method stub - return false; - } - @Override - public String[] GetHelpText(String alias) { - // TODO Auto-generated method stub - return null; - } - @Override - public boolean GetPlayerOnly() { - // TODO Auto-generated method stub - return false; - } - @Override - public boolean GetModOnly() { - // TODO Auto-generated method stub - return false; - } - - - - -} diff --git a/src/buttondevteam/alipresents/components/alilinks/commands/Press.java b/src/buttondevteam/alipresents/components/alilinks/commands/Press.java index 4b01942..4b531ed 100644 --- a/src/buttondevteam/alipresents/components/alilinks/commands/Press.java +++ b/src/buttondevteam/alipresents/components/alilinks/commands/Press.java @@ -3,12 +3,19 @@ package buttondevteam.alipresents.components.alilinks.commands; import org.bukkit.entity.Player; import buttondevteam.alipresents.architecture.commands.PlayerCommand; +import buttondevteam.alipresents.components.alilinks.AliLinkAPI; +import buttondevteam.alipresents.components.alilinks.AliLinkComponent; -public class Press extends PlayerCommand{ +public class Press extends PlayerCommand { + @Override + public String GetCommandPath() { + return "alilink press"; + } @Override public boolean OnCommand(Player player, String alias, String[] args) { - // TODO Auto-generated method stub - return false; + if (args.length < 1) + return false; + return AliLinkAPI.sendPressEvent(player, args, AliLinkComponent.getPlugin()); } } diff --git a/src/buttondevteam/alipresents/components/alilinks/commands/Set.java b/src/buttondevteam/alipresents/components/alilinks/commands/Set.java index 38fdc99..23385a6 100644 --- a/src/buttondevteam/alipresents/components/alilinks/commands/Set.java +++ b/src/buttondevteam/alipresents/components/alilinks/commands/Set.java @@ -3,12 +3,18 @@ package buttondevteam.alipresents.components.alilinks.commands; import org.bukkit.entity.Player; import buttondevteam.alipresents.architecture.commands.ModCommand; +import buttondevteam.alipresents.components.alilinks.AliLinkAPI; -public class Set extends ModCommand{ +public class Set extends ModCommand { @Override - public boolean OnCommand(Player player, String alias, String[] args) { - // TODO Auto-generated method stub - return false; + public String GetCommandPath() { + return "alilink set"; } + @Override + public boolean OnCommand(Player player, String alias, String[] args) { + if (args.length < 1) + return false; + return AliLinkAPI.createAliLink(player, args); + } } From 83ecead8878347d6075e2a58d0f936d8f0116105 Mon Sep 17 00:00:00 2001 From: alisolarflare Date: Fri, 16 Dec 2016 14:25:31 -0500 Subject: [PATCH 4/6] pls --- .../alipresents/components/alilinks/AliLinkComponent.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/buttondevteam/alipresents/components/alilinks/AliLinkComponent.java b/src/buttondevteam/alipresents/components/alilinks/AliLinkComponent.java index 9d91954..c36f5cc 100644 --- a/src/buttondevteam/alipresents/components/alilinks/AliLinkComponent.java +++ b/src/buttondevteam/alipresents/components/alilinks/AliLinkComponent.java @@ -15,7 +15,8 @@ public class AliLinkComponent extends Component { @Override public void register(JavaPlugin plugin) { - registerCommand(p = plugin, new Press()); + p = plugin; + registerCommand(plugin, new Press()); registerCommand(plugin, new Set()); } } From 872e1c8ac7fcb8b338fc19891dfa680f2865e7d6 Mon Sep 17 00:00:00 2001 From: alisolarflare Date: Sat, 17 Dec 2016 00:14:52 -0500 Subject: [PATCH 5/6] Adjusted commands to reduce plugin.yml --- plugin.yml | 86 ++++--------------- .../alipresents/AliPresents.java | 4 +- .../bankchest/BankChestComponent.java | 15 ---- .../bankchest/BankChestListener.java | 6 -- .../components/bankchest/CreateBankChest.java | 15 ---- .../creativeboundaries/commands/Cbgm0.java | 4 + .../creativeboundaries/commands/Cbgm1.java | 4 + .../commands/SetForceBoundaries.java | 5 ++ .../letterdyes/GetLetterDye.java | 4 + .../flaircolouring/portals/FlairMe.java | 4 + .../{gpowers => gpower}/GPowerComponent.java | 10 +-- .../{gpowers => gpower}/PoweredPlayer.java | 2 +- .../{gpowers => gpower}/api/GPowerAPI.java | 4 +- .../{gpowers => gpower}/commands/GPower.java | 13 ++- .../enchant/EnchantingLoop.java | 4 +- .../powerstate/PowerAll.java | 4 +- .../powerstate/PowerDown.java | 4 +- .../powerstate/PowerUp.java | 4 +- .../components/insurance/getInsurance.java | 5 ++ .../components/insurance/getInsuranceBar.java | 5 ++ .../insurance/getInsuranceBlock.java | 4 + .../insurance/getInsuranceNugget.java | 4 + .../metrics/output/GetLoginMetrics.java | 5 ++ 23 files changed, 86 insertions(+), 129 deletions(-) delete mode 100644 src/buttondevteam/alipresents/components/bankchest/BankChestComponent.java delete mode 100644 src/buttondevteam/alipresents/components/bankchest/BankChestListener.java delete mode 100644 src/buttondevteam/alipresents/components/bankchest/CreateBankChest.java rename src/buttondevteam/alipresents/components/{gpowers => gpower}/GPowerComponent.java (53%) rename src/buttondevteam/alipresents/components/{gpowers => gpower}/PoweredPlayer.java (88%) rename src/buttondevteam/alipresents/components/{gpowers => gpower}/api/GPowerAPI.java (94%) rename src/buttondevteam/alipresents/components/{gpowers => gpower}/commands/GPower.java (88%) rename src/buttondevteam/alipresents/components/{gpowers => gpower}/enchant/EnchantingLoop.java (79%) rename src/buttondevteam/alipresents/components/{gpowers => gpower}/powerstate/PowerAll.java (76%) rename src/buttondevteam/alipresents/components/{gpowers => gpower}/powerstate/PowerDown.java (73%) rename src/buttondevteam/alipresents/components/{gpowers => gpower}/powerstate/PowerUp.java (74%) diff --git a/plugin.yml b/plugin.yml index f2f172d..33b77f6 100644 --- a/plugin.yml +++ b/plugin.yml @@ -3,71 +3,23 @@ name: AliPresents version: 2.0.2 commands: - flairme: - description: Activates the Flair Me Command. Ask Ali - she was tired when writing this description - gpower: - description: Testing command for ghostie powers - powerup: - description: Official g-power command that activates the ghostie powerups - powerdown: - description: Offical g-power command that deactivates the ghostie powerups alilink: - description: Arguments - press or set - cbgm0: - description: Creative Boundaries Gamemode 0 - allows players to return to survival - cbgm1: - description: Creative Boundaries Gamemode 1 - allows players to access creative within their towns. Creative is removed outside of towns so be careful - setforceboundaries: - description: Should players automatically return to creative when outside town borders? Dickmode says yes. - joinminigame: - description: Join a Button Minigame - leaveminigame: - description: Leave a button minigame - listfighters: - description: List all fighters currently in a button minigame - setcolourspawn: - description: sets the spawn points for each colour in a button minigame - setmatchstate: - description: sets the current state of the ultrahardcore game. - addtouhc: - description: Adds a player to the UltraHardcore match - joinuhc: - description: This command allows you to join an UltraHardcore match - configurematch: - description: Configures an UltraHardcore match - schedulematch: - description: Schedules an UltraHardcore match - startmatch: - description: Starts an UltraHardcore match - spreadplayers: - description: Admin command that spreads players around an ultrahardcore match - teleporttouhc: - description: Teleports you to the ultrahardcore match - setuhclobby: - description: Sets the area where a uhc will take place - activatepowers: - description: Admin command that activates gpowers on a uhc - setworldborders: - description: sets the worldborders to a uhc match - startuhc: - description: starts an ultrahardcore match - starttimer: - description: starts an ultrahardcore timer - powerall: - description: activate every player's power - setproximitylocation: - description: sets one of two proximity blocks to create a space that players can change their flairs with using flairportals. Ask ali XD - getloginmetrics: - description: Gets metrics - getinsurance: - description: Gets insurance - getinsurancenugget: - description: Gets insurance nugget - getinsurancebar: - description: Gets insurance bar - getinsuranceblock: - description: Gets insurance block - createbankchest: - description: Creates a Bank Chest - getletterdye: - description: Creates Letter Dye \ No newline at end of file + description: creates wireless redstone + cashmob: + description: creates mobs + cb: + description: creates creative boundaries + debug: + description: debug commands + flaircolouring: + description: flaaairs + fruit: + description: fruits + gpower: + description: powerssss + insurance: + description: item block insurance + magic: + description: magic + metrics: + description: metrics system \ No newline at end of file diff --git a/src/buttondevteam/alipresents/AliPresents.java b/src/buttondevteam/alipresents/AliPresents.java index a7a7820..6092cf5 100644 --- a/src/buttondevteam/alipresents/AliPresents.java +++ b/src/buttondevteam/alipresents/AliPresents.java @@ -7,12 +7,11 @@ import org.bukkit.plugin.PluginDescriptionFile; import org.bukkit.plugin.java.JavaPlugin; import buttondevteam.alipresents.components.alilinks.AliLinkComponent; -import buttondevteam.alipresents.components.bankchest.BankChestComponent; import buttondevteam.alipresents.components.cashmob.CashMobComponent; import buttondevteam.alipresents.components.creativeboundaries.CreativeBoundariesComponent; import buttondevteam.alipresents.components.flaircolouring.FlairColouringComponent; import buttondevteam.alipresents.components.fruit.FruitComponent; -import buttondevteam.alipresents.components.gpowers.GPowerComponent; +import buttondevteam.alipresents.components.gpower.GPowerComponent; import buttondevteam.alipresents.components.insurance.InsuranceComponent; import buttondevteam.alipresents.components.magic.MagicComponent; import buttondevteam.alipresents.components.spawn.SpawnComponent; @@ -26,7 +25,6 @@ public class AliPresents extends JavaPlugin{ new AliLinkComponent().register(this); - new BankChestComponent().register(this); new CashMobComponent().register(this); new CreativeBoundariesComponent().register(this); new FlairColouringComponent().register(this); diff --git a/src/buttondevteam/alipresents/components/bankchest/BankChestComponent.java b/src/buttondevteam/alipresents/components/bankchest/BankChestComponent.java deleted file mode 100644 index a0fe761..0000000 --- a/src/buttondevteam/alipresents/components/bankchest/BankChestComponent.java +++ /dev/null @@ -1,15 +0,0 @@ -package buttondevteam.alipresents.components.bankchest; - -import org.bukkit.plugin.java.JavaPlugin; - -import buttondevteam.alipresents.architecture.Component; - -public class BankChestComponent extends Component { - - @Override - public void register(JavaPlugin plugin) { - registerCommand(plugin, new CreateBankChest()); - registerListener(plugin, new BankChestListener()); - } - -} diff --git a/src/buttondevteam/alipresents/components/bankchest/BankChestListener.java b/src/buttondevteam/alipresents/components/bankchest/BankChestListener.java deleted file mode 100644 index b13dbba..0000000 --- a/src/buttondevteam/alipresents/components/bankchest/BankChestListener.java +++ /dev/null @@ -1,6 +0,0 @@ -package buttondevteam.alipresents.components.bankchest; - -import org.bukkit.event.Listener; - -public class BankChestListener implements Listener { -} diff --git a/src/buttondevteam/alipresents/components/bankchest/CreateBankChest.java b/src/buttondevteam/alipresents/components/bankchest/CreateBankChest.java deleted file mode 100644 index 6af2665..0000000 --- a/src/buttondevteam/alipresents/components/bankchest/CreateBankChest.java +++ /dev/null @@ -1,15 +0,0 @@ -package buttondevteam.alipresents.components.bankchest; - -import org.bukkit.entity.Player; - -import buttondevteam.alipresents.architecture.commands.ModCommand; - -public class CreateBankChest extends ModCommand { - - @Override - public boolean OnCommand(Player player, String alias, String[] args) { - // TODO Auto-generated method stub - return false; - } - -} diff --git a/src/buttondevteam/alipresents/components/creativeboundaries/commands/Cbgm0.java b/src/buttondevteam/alipresents/components/creativeboundaries/commands/Cbgm0.java index 17d6dda..2d026df 100644 --- a/src/buttondevteam/alipresents/components/creativeboundaries/commands/Cbgm0.java +++ b/src/buttondevteam/alipresents/components/creativeboundaries/commands/Cbgm0.java @@ -6,6 +6,10 @@ import buttondevteam.alipresents.architecture.commands.PlayerCommand; import buttondevteam.alipresents.components.creativeboundaries.CreativeBoundariesAPI; public class Cbgm0 extends PlayerCommand{ + @Override + public String GetCommandPath() { + return "cb gm1"; + } @Override public boolean OnCommand(Player player, String arg2, String[] arg3) { CreativeBoundariesAPI.toSurvival(player); diff --git a/src/buttondevteam/alipresents/components/creativeboundaries/commands/Cbgm1.java b/src/buttondevteam/alipresents/components/creativeboundaries/commands/Cbgm1.java index 9266a52..aa78055 100644 --- a/src/buttondevteam/alipresents/components/creativeboundaries/commands/Cbgm1.java +++ b/src/buttondevteam/alipresents/components/creativeboundaries/commands/Cbgm1.java @@ -6,6 +6,10 @@ import buttondevteam.alipresents.architecture.commands.PlayerCommand; import buttondevteam.alipresents.components.creativeboundaries.CreativeBoundariesAPI; public class Cbgm1 extends PlayerCommand { + @Override + public String GetCommandPath() { + return "cb gm0"; + } @Override public boolean OnCommand(Player player, String arg2, String[] arg3) { return CreativeBoundariesAPI.toCreative(player); diff --git a/src/buttondevteam/alipresents/components/creativeboundaries/commands/SetForceBoundaries.java b/src/buttondevteam/alipresents/components/creativeboundaries/commands/SetForceBoundaries.java index 22d2c98..ebc527f 100644 --- a/src/buttondevteam/alipresents/components/creativeboundaries/commands/SetForceBoundaries.java +++ b/src/buttondevteam/alipresents/components/creativeboundaries/commands/SetForceBoundaries.java @@ -6,6 +6,11 @@ import buttondevteam.alipresents.architecture.commands.ModCommand; import buttondevteam.alipresents.components.creativeboundaries.CreativeBoundariesAPI; public class SetForceBoundaries extends ModCommand{ + + @Override + public String GetCommandPath() { + return "cb set forceboundaries"; + } @Override public boolean OnCommand(Player player, String label, String[] args) { return (CreativeBoundariesAPI.setForceBoundaries(player, args)); diff --git a/src/buttondevteam/alipresents/components/flaircolouring/letterdyes/GetLetterDye.java b/src/buttondevteam/alipresents/components/flaircolouring/letterdyes/GetLetterDye.java index efe7fa5..e88153b 100644 --- a/src/buttondevteam/alipresents/components/flaircolouring/letterdyes/GetLetterDye.java +++ b/src/buttondevteam/alipresents/components/flaircolouring/letterdyes/GetLetterDye.java @@ -5,6 +5,10 @@ import org.bukkit.entity.Player; import buttondevteam.alipresents.architecture.commands.PlayerCommand; public class GetLetterDye extends PlayerCommand{ + @Override + public String GetCommandPath() { + return "flaircolour getletterdye"; + } @Override public boolean OnCommand(Player player, String alias, String[] args) { player.getInventory().addItem(LetterDye.getLetterDye()); diff --git a/src/buttondevteam/alipresents/components/flaircolouring/portals/FlairMe.java b/src/buttondevteam/alipresents/components/flaircolouring/portals/FlairMe.java index 6595949..e14ddb8 100644 --- a/src/buttondevteam/alipresents/components/flaircolouring/portals/FlairMe.java +++ b/src/buttondevteam/alipresents/components/flaircolouring/portals/FlairMe.java @@ -6,6 +6,10 @@ import buttondevteam.alipresents.architecture.commands.PlayerCommand; import buttondevteam.alipresents.components.flaircolouring.FlairColouringComponent; public class FlairMe extends PlayerCommand { + @Override + public String GetCommandPath() { + return "flaircolouring flairme"; + } private FlairColouringComponent component; public FlairMe(FlairColouringComponent flairDoorComponent) { diff --git a/src/buttondevteam/alipresents/components/gpowers/GPowerComponent.java b/src/buttondevteam/alipresents/components/gpower/GPowerComponent.java similarity index 53% rename from src/buttondevteam/alipresents/components/gpowers/GPowerComponent.java rename to src/buttondevteam/alipresents/components/gpower/GPowerComponent.java index 9e9ce33..295cc6b 100644 --- a/src/buttondevteam/alipresents/components/gpowers/GPowerComponent.java +++ b/src/buttondevteam/alipresents/components/gpower/GPowerComponent.java @@ -1,12 +1,12 @@ -package buttondevteam.alipresents.components.gpowers; +package buttondevteam.alipresents.components.gpower; import org.bukkit.plugin.java.JavaPlugin; import buttondevteam.alipresents.architecture.Component; -import buttondevteam.alipresents.components.gpowers.commands.GPower; -import buttondevteam.alipresents.components.gpowers.enchant.EnchantingLoop; -import buttondevteam.alipresents.components.gpowers.powerstate.PowerDown; -import buttondevteam.alipresents.components.gpowers.powerstate.PowerUp; +import buttondevteam.alipresents.components.gpower.commands.GPower; +import buttondevteam.alipresents.components.gpower.enchant.EnchantingLoop; +import buttondevteam.alipresents.components.gpower.powerstate.PowerDown; +import buttondevteam.alipresents.components.gpower.powerstate.PowerUp; public class GPowerComponent extends Component { diff --git a/src/buttondevteam/alipresents/components/gpowers/PoweredPlayer.java b/src/buttondevteam/alipresents/components/gpower/PoweredPlayer.java similarity index 88% rename from src/buttondevteam/alipresents/components/gpowers/PoweredPlayer.java rename to src/buttondevteam/alipresents/components/gpower/PoweredPlayer.java index 7e33220..8915b13 100644 --- a/src/buttondevteam/alipresents/components/gpowers/PoweredPlayer.java +++ b/src/buttondevteam/alipresents/components/gpower/PoweredPlayer.java @@ -1,4 +1,4 @@ -package buttondevteam.alipresents.components.gpowers; +package buttondevteam.alipresents.components.gpower; import java.util.UUID; diff --git a/src/buttondevteam/alipresents/components/gpowers/api/GPowerAPI.java b/src/buttondevteam/alipresents/components/gpower/api/GPowerAPI.java similarity index 94% rename from src/buttondevteam/alipresents/components/gpowers/api/GPowerAPI.java rename to src/buttondevteam/alipresents/components/gpower/api/GPowerAPI.java index 76ccfa9..3596613 100644 --- a/src/buttondevteam/alipresents/components/gpowers/api/GPowerAPI.java +++ b/src/buttondevteam/alipresents/components/gpower/api/GPowerAPI.java @@ -1,4 +1,4 @@ -package buttondevteam.alipresents.components.gpowers.api; +package buttondevteam.alipresents.components.gpower.api; import java.util.HashMap; import java.util.Map; @@ -9,7 +9,7 @@ import org.bukkit.entity.Player; import org.bukkit.potion.PotionEffect; import org.bukkit.potion.PotionEffectType; -import buttondevteam.alipresents.components.gpowers.PoweredPlayer; +import buttondevteam.alipresents.components.gpower.PoweredPlayer; public class GPowerAPI{ public static final int defaultPowerLength = 300; diff --git a/src/buttondevteam/alipresents/components/gpowers/commands/GPower.java b/src/buttondevteam/alipresents/components/gpower/commands/GPower.java similarity index 88% rename from src/buttondevteam/alipresents/components/gpowers/commands/GPower.java rename to src/buttondevteam/alipresents/components/gpower/commands/GPower.java index 8b9abac..9c95f31 100644 --- a/src/buttondevteam/alipresents/components/gpowers/commands/GPower.java +++ b/src/buttondevteam/alipresents/components/gpower/commands/GPower.java @@ -1,11 +1,15 @@ -package buttondevteam.alipresents.components.gpowers.commands; +package buttondevteam.alipresents.components.gpower.commands; import org.bukkit.entity.Player; import buttondevteam.alipresents.architecture.commands.PlayerCommand; -import buttondevteam.alipresents.components.gpowers.api.GPowerAPI; +import buttondevteam.alipresents.components.gpower.api.GPowerAPI; public class GPower extends PlayerCommand { + @Override + public String GetCommandPath() { + return "gpower"; + } @Override public boolean OnCommand(Player player, String label, String[] args) { if (args.length < 2) { @@ -36,11 +40,6 @@ public class GPower extends PlayerCommand { return true; } - - @Override - public String GetCommandPath() { - return "gpower"; - } public String[] GetHelpText(String alias){ return new String[]{ "Usage: /gpowertest [colour=red,orange,yellow,green,blue,purple,grey] [active=true/false]" diff --git a/src/buttondevteam/alipresents/components/gpowers/enchant/EnchantingLoop.java b/src/buttondevteam/alipresents/components/gpower/enchant/EnchantingLoop.java similarity index 79% rename from src/buttondevteam/alipresents/components/gpowers/enchant/EnchantingLoop.java rename to src/buttondevteam/alipresents/components/gpower/enchant/EnchantingLoop.java index 5cb224e..0cc205b 100644 --- a/src/buttondevteam/alipresents/components/gpowers/enchant/EnchantingLoop.java +++ b/src/buttondevteam/alipresents/components/gpower/enchant/EnchantingLoop.java @@ -1,4 +1,4 @@ -package buttondevteam.alipresents.components.gpowers.enchant; +package buttondevteam.alipresents.components.gpower.enchant; import org.bukkit.Server; import org.bukkit.entity.Player; @@ -6,7 +6,7 @@ import org.bukkit.event.Listener; import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.scheduler.BukkitRunnable; -import buttondevteam.alipresents.components.gpowers.api.GPowerAPI; +import buttondevteam.alipresents.components.gpower.api.GPowerAPI; public class EnchantingLoop extends BukkitRunnable implements Listener{ private Server server; diff --git a/src/buttondevteam/alipresents/components/gpowers/powerstate/PowerAll.java b/src/buttondevteam/alipresents/components/gpower/powerstate/PowerAll.java similarity index 76% rename from src/buttondevteam/alipresents/components/gpowers/powerstate/PowerAll.java rename to src/buttondevteam/alipresents/components/gpower/powerstate/PowerAll.java index 525a728..2da86db 100644 --- a/src/buttondevteam/alipresents/components/gpowers/powerstate/PowerAll.java +++ b/src/buttondevteam/alipresents/components/gpower/powerstate/PowerAll.java @@ -1,9 +1,9 @@ -package buttondevteam.alipresents.components.gpowers.powerstate; +package buttondevteam.alipresents.components.gpower.powerstate; import org.bukkit.entity.Player; import buttondevteam.alipresents.architecture.commands.ModCommand; -import buttondevteam.alipresents.components.gpowers.api.GPowerAPI; +import buttondevteam.alipresents.components.gpower.api.GPowerAPI; public class PowerAll extends ModCommand{ @Override diff --git a/src/buttondevteam/alipresents/components/gpowers/powerstate/PowerDown.java b/src/buttondevteam/alipresents/components/gpower/powerstate/PowerDown.java similarity index 73% rename from src/buttondevteam/alipresents/components/gpowers/powerstate/PowerDown.java rename to src/buttondevteam/alipresents/components/gpower/powerstate/PowerDown.java index 4217219..4f60034 100644 --- a/src/buttondevteam/alipresents/components/gpowers/powerstate/PowerDown.java +++ b/src/buttondevteam/alipresents/components/gpower/powerstate/PowerDown.java @@ -1,9 +1,9 @@ -package buttondevteam.alipresents.components.gpowers.powerstate; +package buttondevteam.alipresents.components.gpower.powerstate; import org.bukkit.entity.Player; import buttondevteam.alipresents.architecture.commands.PlayerCommand; -import buttondevteam.alipresents.components.gpowers.api.GPowerAPI; +import buttondevteam.alipresents.components.gpower.api.GPowerAPI; public class PowerDown extends PlayerCommand { @Override diff --git a/src/buttondevteam/alipresents/components/gpowers/powerstate/PowerUp.java b/src/buttondevteam/alipresents/components/gpower/powerstate/PowerUp.java similarity index 74% rename from src/buttondevteam/alipresents/components/gpowers/powerstate/PowerUp.java rename to src/buttondevteam/alipresents/components/gpower/powerstate/PowerUp.java index 050f08f..b3d7f96 100644 --- a/src/buttondevteam/alipresents/components/gpowers/powerstate/PowerUp.java +++ b/src/buttondevteam/alipresents/components/gpower/powerstate/PowerUp.java @@ -1,9 +1,9 @@ -package buttondevteam.alipresents.components.gpowers.powerstate; +package buttondevteam.alipresents.components.gpower.powerstate; import org.bukkit.entity.Player; import buttondevteam.alipresents.architecture.commands.PlayerCommand; -import buttondevteam.alipresents.components.gpowers.api.GPowerAPI; +import buttondevteam.alipresents.components.gpower.api.GPowerAPI; public class PowerUp extends PlayerCommand { @Override diff --git a/src/buttondevteam/alipresents/components/insurance/getInsurance.java b/src/buttondevteam/alipresents/components/insurance/getInsurance.java index c760f5d..6a687ea 100644 --- a/src/buttondevteam/alipresents/components/insurance/getInsurance.java +++ b/src/buttondevteam/alipresents/components/insurance/getInsurance.java @@ -51,4 +51,9 @@ public class getInsurance extends ModCommand { }; } + @Override + public String GetCommandPath() { + return "insurance get"; + } + } diff --git a/src/buttondevteam/alipresents/components/insurance/getInsuranceBar.java b/src/buttondevteam/alipresents/components/insurance/getInsuranceBar.java index af00805..13f3339 100644 --- a/src/buttondevteam/alipresents/components/insurance/getInsuranceBar.java +++ b/src/buttondevteam/alipresents/components/insurance/getInsuranceBar.java @@ -17,4 +17,9 @@ public class getInsuranceBar extends ModCommand { } return true; } + + @Override + public String GetCommandPath() { + return "insurance getBar"; + } } diff --git a/src/buttondevteam/alipresents/components/insurance/getInsuranceBlock.java b/src/buttondevteam/alipresents/components/insurance/getInsuranceBlock.java index 37b4173..f671c12 100644 --- a/src/buttondevteam/alipresents/components/insurance/getInsuranceBlock.java +++ b/src/buttondevteam/alipresents/components/insurance/getInsuranceBlock.java @@ -18,4 +18,8 @@ public class getInsuranceBlock extends ModCommand { return false; } + @Override + public String GetCommandPath() { + return "insurance getblock"; + } } diff --git a/src/buttondevteam/alipresents/components/insurance/getInsuranceNugget.java b/src/buttondevteam/alipresents/components/insurance/getInsuranceNugget.java index 8363916..5ccaa03 100644 --- a/src/buttondevteam/alipresents/components/insurance/getInsuranceNugget.java +++ b/src/buttondevteam/alipresents/components/insurance/getInsuranceNugget.java @@ -17,5 +17,9 @@ public class getInsuranceNugget extends ModCommand { } return false; } + @Override + public String GetCommandPath() { + return "insurance getnugget"; + } } diff --git a/src/buttondevteam/alipresents/components/metrics/output/GetLoginMetrics.java b/src/buttondevteam/alipresents/components/metrics/output/GetLoginMetrics.java index 3778d0f..628b847 100644 --- a/src/buttondevteam/alipresents/components/metrics/output/GetLoginMetrics.java +++ b/src/buttondevteam/alipresents/components/metrics/output/GetLoginMetrics.java @@ -65,4 +65,9 @@ public class GetLoginMetrics extends ModCommand{ } return true; } + + @Override + public String GetCommandPath() { + return "metrics get logins"; + } } From 27f73ae61f100c34ceb2dc4e98e4a115e30782c5 Mon Sep 17 00:00:00 2001 From: alisolarflare Date: Sat, 17 Dec 2016 02:40:25 -0500 Subject: [PATCH 6/6] Subcommanded all the commands --- plugin.yml | 2 +- src/buttondevteam/alipresents/AliPresents.java | 4 ++-- .../architecture/commands/PlayerCommand.java | 6 ++++-- .../FlairColourAPI.java} | 4 ++-- .../FlairColourComponent.java} | 18 +++++++++--------- .../letterdyes/GetLetterDye.java | 2 +- .../letterdyes/LetterDye.java | 2 +- .../letterdyes/LetterDyeListener.java | 6 +++--- .../portals/FlairMe.java | 10 +++++----- .../portals/PlayerProximityLoop.java | 8 ++++---- .../portals/PortalListener.java | 14 +++++++------- .../portals/SetProximityLocation.java | 7 ++++++- .../components/gpower/powerstate/PowerAll.java | 4 ++++ .../gpower/powerstate/PowerDown.java | 5 +++++ .../components/gpower/powerstate/PowerUp.java | 4 ++++ 15 files changed, 58 insertions(+), 38 deletions(-) rename src/buttondevteam/alipresents/components/{flaircolouring/FlairColouringAPI.java => flaircolour/FlairColourAPI.java} (96%) rename src/buttondevteam/alipresents/components/{flaircolouring/FlairColouringComponent.java => flaircolour/FlairColourComponent.java} (60%) rename src/buttondevteam/alipresents/components/{flaircolouring => flaircolour}/letterdyes/GetLetterDye.java (84%) rename src/buttondevteam/alipresents/components/{flaircolouring => flaircolour}/letterdyes/LetterDye.java (86%) rename src/buttondevteam/alipresents/components/{flaircolouring => flaircolour}/letterdyes/LetterDyeListener.java (83%) rename src/buttondevteam/alipresents/components/{flaircolouring => flaircolour}/portals/FlairMe.java (67%) rename src/buttondevteam/alipresents/components/{flaircolouring => flaircolour}/portals/PlayerProximityLoop.java (87%) rename src/buttondevteam/alipresents/components/{flaircolouring => flaircolour}/portals/PortalListener.java (76%) rename src/buttondevteam/alipresents/components/{flaircolouring => flaircolour}/portals/SetProximityLocation.java (86%) diff --git a/plugin.yml b/plugin.yml index 33b77f6..3e396be 100644 --- a/plugin.yml +++ b/plugin.yml @@ -11,7 +11,7 @@ commands: description: creates creative boundaries debug: description: debug commands - flaircolouring: + flaircolour: description: flaaairs fruit: description: fruits diff --git a/src/buttondevteam/alipresents/AliPresents.java b/src/buttondevteam/alipresents/AliPresents.java index 6092cf5..dcc752c 100644 --- a/src/buttondevteam/alipresents/AliPresents.java +++ b/src/buttondevteam/alipresents/AliPresents.java @@ -9,7 +9,7 @@ import org.bukkit.plugin.java.JavaPlugin; import buttondevteam.alipresents.components.alilinks.AliLinkComponent; import buttondevteam.alipresents.components.cashmob.CashMobComponent; import buttondevteam.alipresents.components.creativeboundaries.CreativeBoundariesComponent; -import buttondevteam.alipresents.components.flaircolouring.FlairColouringComponent; +import buttondevteam.alipresents.components.flaircolour.FlairColourComponent; import buttondevteam.alipresents.components.fruit.FruitComponent; import buttondevteam.alipresents.components.gpower.GPowerComponent; import buttondevteam.alipresents.components.insurance.InsuranceComponent; @@ -27,7 +27,7 @@ public class AliPresents extends JavaPlugin{ new AliLinkComponent().register(this); new CashMobComponent().register(this); new CreativeBoundariesComponent().register(this); - new FlairColouringComponent().register(this); + new FlairColourComponent().register(this); new FruitComponent().register(this); new GPowerComponent().register(this); new InsuranceComponent().register(this); diff --git a/src/buttondevteam/alipresents/architecture/commands/PlayerCommand.java b/src/buttondevteam/alipresents/architecture/commands/PlayerCommand.java index fa0282d..df0b997 100644 --- a/src/buttondevteam/alipresents/architecture/commands/PlayerCommand.java +++ b/src/buttondevteam/alipresents/architecture/commands/PlayerCommand.java @@ -7,12 +7,14 @@ 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); + public boolean onCommand(CommandSender sender, Command command, String string, String[] args){ + sender.sendMessage("activating" + string.toString()); + return OnCommand(sender, string, args); } /**replaces TBMCCommandBase functionality*/ @Override public boolean OnCommand(CommandSender sender, String alias, String[] args){ + sender.sendMessage("activating" + alias.toString()); return OnCommand((Player) sender, alias, args); } public abstract boolean OnCommand(Player player, String alias, String[] args); diff --git a/src/buttondevteam/alipresents/components/flaircolouring/FlairColouringAPI.java b/src/buttondevteam/alipresents/components/flaircolour/FlairColourAPI.java similarity index 96% rename from src/buttondevteam/alipresents/components/flaircolouring/FlairColouringAPI.java rename to src/buttondevteam/alipresents/components/flaircolour/FlairColourAPI.java index 91a2bba..24dcd6f 100644 --- a/src/buttondevteam/alipresents/components/flaircolouring/FlairColouringAPI.java +++ b/src/buttondevteam/alipresents/components/flaircolour/FlairColourAPI.java @@ -1,10 +1,10 @@ -package buttondevteam.alipresents.components.flaircolouring; +package buttondevteam.alipresents.components.flaircolour; import org.bukkit.DyeColor; import com.earth2me.essentials.User; -public class FlairColouringAPI { +public class FlairColourAPI { public static void recolourPlayer(User user, DyeColor dyecolour){ String name = user._getNickname(); String sanitizedName = ""; diff --git a/src/buttondevteam/alipresents/components/flaircolouring/FlairColouringComponent.java b/src/buttondevteam/alipresents/components/flaircolour/FlairColourComponent.java similarity index 60% rename from src/buttondevteam/alipresents/components/flaircolouring/FlairColouringComponent.java rename to src/buttondevteam/alipresents/components/flaircolour/FlairColourComponent.java index 04b6575..d8f0485 100644 --- a/src/buttondevteam/alipresents/components/flaircolouring/FlairColouringComponent.java +++ b/src/buttondevteam/alipresents/components/flaircolour/FlairColourComponent.java @@ -1,4 +1,4 @@ -package buttondevteam.alipresents.components.flaircolouring; +package buttondevteam.alipresents.components.flaircolour; import java.util.ArrayList; import java.util.List; @@ -13,15 +13,15 @@ import org.bukkit.plugin.java.JavaPlugin; import com.earth2me.essentials.Essentials; import buttondevteam.alipresents.architecture.Component; -import buttondevteam.alipresents.components.flaircolouring.letterdyes.GetLetterDye; -import buttondevteam.alipresents.components.flaircolouring.letterdyes.LetterDye; -import buttondevteam.alipresents.components.flaircolouring.letterdyes.LetterDyeListener; -import buttondevteam.alipresents.components.flaircolouring.portals.FlairMe; -import buttondevteam.alipresents.components.flaircolouring.portals.PlayerProximityLoop; -import buttondevteam.alipresents.components.flaircolouring.portals.PortalListener; -import buttondevteam.alipresents.components.flaircolouring.portals.SetProximityLocation; +import buttondevteam.alipresents.components.flaircolour.letterdyes.GetLetterDye; +import buttondevteam.alipresents.components.flaircolour.letterdyes.LetterDye; +import buttondevteam.alipresents.components.flaircolour.letterdyes.LetterDyeListener; +import buttondevteam.alipresents.components.flaircolour.portals.FlairMe; +import buttondevteam.alipresents.components.flaircolour.portals.PlayerProximityLoop; +import buttondevteam.alipresents.components.flaircolour.portals.PortalListener; +import buttondevteam.alipresents.components.flaircolour.portals.SetProximityLocation; -public class FlairColouringComponent extends Component { +public class FlairColourComponent extends Component { public List playersToBeFlaired = new ArrayList(); @Override public void register(JavaPlugin plugin) { diff --git a/src/buttondevteam/alipresents/components/flaircolouring/letterdyes/GetLetterDye.java b/src/buttondevteam/alipresents/components/flaircolour/letterdyes/GetLetterDye.java similarity index 84% rename from src/buttondevteam/alipresents/components/flaircolouring/letterdyes/GetLetterDye.java rename to src/buttondevteam/alipresents/components/flaircolour/letterdyes/GetLetterDye.java index e88153b..95597ff 100644 --- a/src/buttondevteam/alipresents/components/flaircolouring/letterdyes/GetLetterDye.java +++ b/src/buttondevteam/alipresents/components/flaircolour/letterdyes/GetLetterDye.java @@ -1,4 +1,4 @@ -package buttondevteam.alipresents.components.flaircolouring.letterdyes; +package buttondevteam.alipresents.components.flaircolour.letterdyes; import org.bukkit.entity.Player; diff --git a/src/buttondevteam/alipresents/components/flaircolouring/letterdyes/LetterDye.java b/src/buttondevteam/alipresents/components/flaircolour/letterdyes/LetterDye.java similarity index 86% rename from src/buttondevteam/alipresents/components/flaircolouring/letterdyes/LetterDye.java rename to src/buttondevteam/alipresents/components/flaircolour/letterdyes/LetterDye.java index 0c3cf0d..fa29f60 100644 --- a/src/buttondevteam/alipresents/components/flaircolouring/letterdyes/LetterDye.java +++ b/src/buttondevteam/alipresents/components/flaircolour/letterdyes/LetterDye.java @@ -1,4 +1,4 @@ -package buttondevteam.alipresents.components.flaircolouring.letterdyes; +package buttondevteam.alipresents.components.flaircolour.letterdyes; import org.bukkit.Material; import org.bukkit.enchantments.Enchantment; diff --git a/src/buttondevteam/alipresents/components/flaircolouring/letterdyes/LetterDyeListener.java b/src/buttondevteam/alipresents/components/flaircolour/letterdyes/LetterDyeListener.java similarity index 83% rename from src/buttondevteam/alipresents/components/flaircolouring/letterdyes/LetterDyeListener.java rename to src/buttondevteam/alipresents/components/flaircolour/letterdyes/LetterDyeListener.java index 0e20ba9..7668acb 100644 --- a/src/buttondevteam/alipresents/components/flaircolouring/letterdyes/LetterDyeListener.java +++ b/src/buttondevteam/alipresents/components/flaircolour/letterdyes/LetterDyeListener.java @@ -1,4 +1,4 @@ -package buttondevteam.alipresents.components.flaircolouring.letterdyes; +package buttondevteam.alipresents.components.flaircolour.letterdyes; import org.bukkit.Material; import org.bukkit.enchantments.Enchantment; @@ -12,7 +12,7 @@ import org.bukkit.material.Dye; import com.earth2me.essentials.Essentials; import com.earth2me.essentials.User; -import buttondevteam.alipresents.components.flaircolouring.FlairColouringAPI; +import buttondevteam.alipresents.components.flaircolour.FlairColourAPI; public class LetterDyeListener implements Listener{ private Essentials essentials; @@ -32,7 +32,7 @@ public class LetterDyeListener implements Listener{ Dye dye = (Dye) event.getItem().getData(); User user = essentials.getUser(event.getPlayer()); - user.setNickname(FlairColouringAPI.colourShiftRight(user._getNickname(), dye.getColor())); + user.setNickname(FlairColourAPI.colourShiftRight(user._getNickname(), dye.getColor())); }catch(Exception e){ event.getPlayer().sendMessage(e.getStackTrace().toString()); } diff --git a/src/buttondevteam/alipresents/components/flaircolouring/portals/FlairMe.java b/src/buttondevteam/alipresents/components/flaircolour/portals/FlairMe.java similarity index 67% rename from src/buttondevteam/alipresents/components/flaircolouring/portals/FlairMe.java rename to src/buttondevteam/alipresents/components/flaircolour/portals/FlairMe.java index e14ddb8..b72ff55 100644 --- a/src/buttondevteam/alipresents/components/flaircolouring/portals/FlairMe.java +++ b/src/buttondevteam/alipresents/components/flaircolour/portals/FlairMe.java @@ -1,18 +1,18 @@ -package buttondevteam.alipresents.components.flaircolouring.portals; +package buttondevteam.alipresents.components.flaircolour.portals; import org.bukkit.entity.Player; import buttondevteam.alipresents.architecture.commands.PlayerCommand; -import buttondevteam.alipresents.components.flaircolouring.FlairColouringComponent; +import buttondevteam.alipresents.components.flaircolour.FlairColourComponent; public class FlairMe extends PlayerCommand { @Override public String GetCommandPath() { - return "flaircolouring flairme"; + return "flaircolour flairme"; } - private FlairColouringComponent component; - public FlairMe(FlairColouringComponent flairDoorComponent) { + private FlairColourComponent component; + public FlairMe(FlairColourComponent flairDoorComponent) { this.component = flairDoorComponent; } @Override diff --git a/src/buttondevteam/alipresents/components/flaircolouring/portals/PlayerProximityLoop.java b/src/buttondevteam/alipresents/components/flaircolour/portals/PlayerProximityLoop.java similarity index 87% rename from src/buttondevteam/alipresents/components/flaircolouring/portals/PlayerProximityLoop.java rename to src/buttondevteam/alipresents/components/flaircolour/portals/PlayerProximityLoop.java index d038db5..f21ffe9 100644 --- a/src/buttondevteam/alipresents/components/flaircolouring/portals/PlayerProximityLoop.java +++ b/src/buttondevteam/alipresents/components/flaircolour/portals/PlayerProximityLoop.java @@ -1,4 +1,4 @@ -package buttondevteam.alipresents.components.flaircolouring.portals; +package buttondevteam.alipresents.components.flaircolour.portals; import org.bukkit.Location; import org.bukkit.entity.Player; @@ -6,11 +6,11 @@ import org.bukkit.event.Listener; import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.scheduler.BukkitRunnable; -import buttondevteam.alipresents.components.flaircolouring.FlairColouringComponent; +import buttondevteam.alipresents.components.flaircolour.FlairColourComponent; public class PlayerProximityLoop extends BukkitRunnable implements Listener{ private static JavaPlugin plugin; - private static FlairColouringComponent component; + private static FlairColourComponent component; private static Location startLocation; private static Location endLocation; @@ -21,7 +21,7 @@ public class PlayerProximityLoop extends BukkitRunnable implements Listener{ private static int eY; private static int eZ; - public PlayerProximityLoop(JavaPlugin plugin, FlairColouringComponent component) { + public PlayerProximityLoop(JavaPlugin plugin, FlairColourComponent component) { PlayerProximityLoop.plugin = plugin; PlayerProximityLoop.component = component; this.runTaskTimer(plugin, 0, 20); diff --git a/src/buttondevteam/alipresents/components/flaircolouring/portals/PortalListener.java b/src/buttondevteam/alipresents/components/flaircolour/portals/PortalListener.java similarity index 76% rename from src/buttondevteam/alipresents/components/flaircolouring/portals/PortalListener.java rename to src/buttondevteam/alipresents/components/flaircolour/portals/PortalListener.java index 89151c9..0e5b2c1 100644 --- a/src/buttondevteam/alipresents/components/flaircolouring/portals/PortalListener.java +++ b/src/buttondevteam/alipresents/components/flaircolour/portals/PortalListener.java @@ -1,4 +1,4 @@ -package buttondevteam.alipresents.components.flaircolouring.portals; +package buttondevteam.alipresents.components.flaircolour.portals; import org.bukkit.Bukkit; import org.bukkit.DyeColor; @@ -13,17 +13,17 @@ import org.bukkit.plugin.java.JavaPlugin; import com.earth2me.essentials.Essentials; -import buttondevteam.alipresents.components.flaircolouring.FlairColouringAPI; -import buttondevteam.alipresents.components.flaircolouring.FlairColouringComponent; +import buttondevteam.alipresents.components.flaircolour.FlairColourAPI; +import buttondevteam.alipresents.components.flaircolour.FlairColourComponent; public class PortalListener implements Listener{ public JavaPlugin plugin; Essentials essentials; - private FlairColouringComponent component; + private FlairColourComponent component; - public PortalListener(JavaPlugin plugin, FlairColouringComponent component) { + public PortalListener(JavaPlugin plugin, FlairColourComponent component) { this.plugin = plugin; this.component = component; this.essentials = ((Essentials) Bukkit.getPluginManager().getPlugin("Essentials")); @@ -51,7 +51,7 @@ public class PortalListener implements Listener{ Block BottomBlock = player.getWorld().getBlockAt(x,y-4,z); //Block under middle block if(HigherBlock.getType() == Material.STONE){ - FlairColouringAPI.recolourPlayer(essentials.getUser(player), DyeColor.GRAY); + FlairColourAPI.recolourPlayer(essentials.getUser(player), DyeColor.GRAY); component.playersToBeFlaired.remove(player.getName()); return; } @@ -67,7 +67,7 @@ public class PortalListener implements Listener{ return; } - FlairColouringAPI.recolourPlayer(essentials.getUser(player), woolColour); + FlairColourAPI.recolourPlayer(essentials.getUser(player), woolColour); component.playersToBeFlaired.remove(player.getName()); } diff --git a/src/buttondevteam/alipresents/components/flaircolouring/portals/SetProximityLocation.java b/src/buttondevteam/alipresents/components/flaircolour/portals/SetProximityLocation.java similarity index 86% rename from src/buttondevteam/alipresents/components/flaircolouring/portals/SetProximityLocation.java rename to src/buttondevteam/alipresents/components/flaircolour/portals/SetProximityLocation.java index 51fb0bc..2f6b910 100644 --- a/src/buttondevteam/alipresents/components/flaircolouring/portals/SetProximityLocation.java +++ b/src/buttondevteam/alipresents/components/flaircolour/portals/SetProximityLocation.java @@ -1,4 +1,4 @@ -package buttondevteam.alipresents.components.flaircolouring.portals; +package buttondevteam.alipresents.components.flaircolour.portals; import org.bukkit.entity.Player; @@ -36,4 +36,9 @@ public class SetProximityLocation extends ModCommand{ "change their colour state." }; } + @Override + public String GetCommandPath() { + return "flaircolour setproximitylocation"; + } + } diff --git a/src/buttondevteam/alipresents/components/gpower/powerstate/PowerAll.java b/src/buttondevteam/alipresents/components/gpower/powerstate/PowerAll.java index 2da86db..f1093ab 100644 --- a/src/buttondevteam/alipresents/components/gpower/powerstate/PowerAll.java +++ b/src/buttondevteam/alipresents/components/gpower/powerstate/PowerAll.java @@ -16,4 +16,8 @@ public class PowerAll extends ModCommand{ "Usage: Type /PowerAll to activate all powers for all players with gpowers" }; } + @Override + public String GetCommandPath() { + return "gpower powerall"; + } } diff --git a/src/buttondevteam/alipresents/components/gpower/powerstate/PowerDown.java b/src/buttondevteam/alipresents/components/gpower/powerstate/PowerDown.java index 4f60034..a1404f5 100644 --- a/src/buttondevteam/alipresents/components/gpower/powerstate/PowerDown.java +++ b/src/buttondevteam/alipresents/components/gpower/powerstate/PowerDown.java @@ -17,4 +17,9 @@ public class PowerDown extends PlayerCommand { "Usage: Type /PowerDown to disable your g-power" }; } + + @Override + public String GetCommandPath() { + return "gpower powerdown"; + } } diff --git a/src/buttondevteam/alipresents/components/gpower/powerstate/PowerUp.java b/src/buttondevteam/alipresents/components/gpower/powerstate/PowerUp.java index b3d7f96..46baa89 100644 --- a/src/buttondevteam/alipresents/components/gpower/powerstate/PowerUp.java +++ b/src/buttondevteam/alipresents/components/gpower/powerstate/PowerUp.java @@ -17,4 +17,8 @@ public class PowerUp extends PlayerCommand { "Usage: Type /PowerUp to activate your registered G-Power" }; } + @Override + public String GetCommandPath() { + return "gpower powerup"; + } }