From 4bc40f6aebaeae81b95f19d5d03e9c027c78b7d0 Mon Sep 17 00:00:00 2001 From: alisolarflare Date: Sat, 17 Dec 2016 08:16:57 -0500 Subject: [PATCH] Fixed and future-proofed help texts #26 yo --- .../alipresents/components/alilinks/commands/Press.java | 7 +++++++ .../alipresents/components/alilinks/commands/Set.java | 7 +++++++ .../creativeboundaries/CreativeBoundariesComponent.java | 1 + .../components/creativeboundaries/commands/Cbgm0.java | 2 +- .../components/creativeboundaries/commands/Cbgm1.java | 2 +- .../creativeboundaries/commands/SetForceBoundaries.java | 2 +- .../components/flaircolour/letterdyes/GetLetterDye.java | 6 ++++++ .../components/flaircolour/portals/FlairMe.java | 2 +- .../flaircolour/portals/SetProximityLocation.java | 2 +- .../alipresents/components/gpower/commands/Test.java | 3 ++- .../components/gpower/powerstate/PowerDown.java | 2 +- .../alipresents/components/gpower/powerstate/PowerUp.java | 2 +- .../alipresents/components/insurance/getInsurance.java | 2 +- .../components/insurance/getInsuranceBlock.java | 2 +- .../components/insurance/getInsuranceIngot.java | 2 +- .../components/insurance/getInsuranceNugget.java | 2 +- 16 files changed, 34 insertions(+), 12 deletions(-) diff --git a/src/buttondevteam/alipresents/components/alilinks/commands/Press.java b/src/buttondevteam/alipresents/components/alilinks/commands/Press.java index 4b531ed..ac8d642 100644 --- a/src/buttondevteam/alipresents/components/alilinks/commands/Press.java +++ b/src/buttondevteam/alipresents/components/alilinks/commands/Press.java @@ -18,4 +18,11 @@ public class Press extends PlayerCommand { return false; return AliLinkAPI.sendPressEvent(player, args, AliLinkComponent.getPlugin()); } + @Override + public String[] GetHelpText(String alias){ + return new String[] { + "Usage: type /"+this.GetCommandPath()+" activate a wireless redstone block listening", + "to your frequency of choice" + }; + } } diff --git a/src/buttondevteam/alipresents/components/alilinks/commands/Set.java b/src/buttondevteam/alipresents/components/alilinks/commands/Set.java index 23385a6..80f650a 100644 --- a/src/buttondevteam/alipresents/components/alilinks/commands/Set.java +++ b/src/buttondevteam/alipresents/components/alilinks/commands/Set.java @@ -17,4 +17,11 @@ public class Set extends ModCommand { return false; return AliLinkAPI.createAliLink(player, args); } + @Override + public String[] GetHelpText(String alias){ + return new String[] { + "Usage: type /"+this.GetCommandPath()+" set a wireless redstone block that listens", + "for signals from the players pressing the frequency of your choice" + }; + } } diff --git a/src/buttondevteam/alipresents/components/creativeboundaries/CreativeBoundariesComponent.java b/src/buttondevteam/alipresents/components/creativeboundaries/CreativeBoundariesComponent.java index 1435c91..182f5b7 100644 --- a/src/buttondevteam/alipresents/components/creativeboundaries/CreativeBoundariesComponent.java +++ b/src/buttondevteam/alipresents/components/creativeboundaries/CreativeBoundariesComponent.java @@ -15,6 +15,7 @@ public class CreativeBoundariesComponent extends Component{ registerCommand(plugin, new Cbgm1()); registerCommand(plugin, new Cbgm0()); registerCommand(plugin, new SetForceBoundaries()); + registerListener(plugin, new PlotChangeListener()); //registerListener(plugin, new ItemRestrictionListener(this)); } diff --git a/src/buttondevteam/alipresents/components/creativeboundaries/commands/Cbgm0.java b/src/buttondevteam/alipresents/components/creativeboundaries/commands/Cbgm0.java index d5dd890..9e8e2b7 100644 --- a/src/buttondevteam/alipresents/components/creativeboundaries/commands/Cbgm0.java +++ b/src/buttondevteam/alipresents/components/creativeboundaries/commands/Cbgm0.java @@ -16,6 +16,6 @@ public class Cbgm0 extends PlayerCommand{ return true; } public String[] GetHelpText(String alias){ - return new String[]{"Creative Boundaries Usage: /cbgm0"}; + return new String[]{"Creative Boundaries Usage: /"+this.GetCommandPath()+""}; } } diff --git a/src/buttondevteam/alipresents/components/creativeboundaries/commands/Cbgm1.java b/src/buttondevteam/alipresents/components/creativeboundaries/commands/Cbgm1.java index b0ea0e2..1f3769d 100644 --- a/src/buttondevteam/alipresents/components/creativeboundaries/commands/Cbgm1.java +++ b/src/buttondevteam/alipresents/components/creativeboundaries/commands/Cbgm1.java @@ -17,7 +17,7 @@ public class Cbgm1 extends PlayerCommand { @Override public String[] GetHelpText(String alias){ return new String[] { - "Usage: When in a town that you either own or are a resident of, type /cbgm1 to gain creative" + "Usage: When in a town that you either own or are a resident of, type /"+this.GetCommandPath()+" to gain creative" }; } } diff --git a/src/buttondevteam/alipresents/components/creativeboundaries/commands/SetForceBoundaries.java b/src/buttondevteam/alipresents/components/creativeboundaries/commands/SetForceBoundaries.java index ebc527f..1df8cc0 100644 --- a/src/buttondevteam/alipresents/components/creativeboundaries/commands/SetForceBoundaries.java +++ b/src/buttondevteam/alipresents/components/creativeboundaries/commands/SetForceBoundaries.java @@ -17,6 +17,6 @@ public class SetForceBoundaries extends ModCommand{ } @Override public String[] GetHelpText(String alias){ - return new String[]{"Usage: /SetForceBoundaries "}; + return new String[]{"Usage: /"+this.GetCommandPath()+" "}; } } diff --git a/src/buttondevteam/alipresents/components/flaircolour/letterdyes/GetLetterDye.java b/src/buttondevteam/alipresents/components/flaircolour/letterdyes/GetLetterDye.java index 95597ff..08db228 100644 --- a/src/buttondevteam/alipresents/components/flaircolour/letterdyes/GetLetterDye.java +++ b/src/buttondevteam/alipresents/components/flaircolour/letterdyes/GetLetterDye.java @@ -14,4 +14,10 @@ public class GetLetterDye extends PlayerCommand{ player.getInventory().addItem(LetterDye.getLetterDye()); return false; } + @Override + public String[] GetHelpText(String alias){ + return new String[]{ + "Usage: Type /"+this.GetCommandPath()+" to get letter dyes that can change your username!" + }; + } } diff --git a/src/buttondevteam/alipresents/components/flaircolour/portals/FlairMe.java b/src/buttondevteam/alipresents/components/flaircolour/portals/FlairMe.java index b72ff55..373fcbf 100644 --- a/src/buttondevteam/alipresents/components/flaircolour/portals/FlairMe.java +++ b/src/buttondevteam/alipresents/components/flaircolour/portals/FlairMe.java @@ -24,7 +24,7 @@ public class FlairMe extends PlayerCommand { @Override public String[] GetHelpText(String alias){ return new String[]{ - "Usage: Type /flairme and enter a portal with coloured", + "Usage: Type /"+this.GetCommandPath()+" and enter a portal with coloured", "wool underneath to change your flair" }; } diff --git a/src/buttondevteam/alipresents/components/flaircolour/portals/SetProximityLocation.java b/src/buttondevteam/alipresents/components/flaircolour/portals/SetProximityLocation.java index 2f6b910..9a68574 100644 --- a/src/buttondevteam/alipresents/components/flaircolour/portals/SetProximityLocation.java +++ b/src/buttondevteam/alipresents/components/flaircolour/portals/SetProximityLocation.java @@ -30,7 +30,7 @@ public class SetProximityLocation extends ModCommand{ } public String[] GetHelpText(String alias){ return new String[] { - "Usage: /SetProximityLocation ", + "Usage: /"+this.GetCommandPath()+" ", "Use this command to set a proximity space: all players", "within this space will become flair-able, and portals will", "change their colour state." diff --git a/src/buttondevteam/alipresents/components/gpower/commands/Test.java b/src/buttondevteam/alipresents/components/gpower/commands/Test.java index 07dc669..f529833 100644 --- a/src/buttondevteam/alipresents/components/gpower/commands/Test.java +++ b/src/buttondevteam/alipresents/components/gpower/commands/Test.java @@ -44,8 +44,9 @@ public class Test extends ModCommand{ @Override public String[] GetHelpText(String alias){ return new String[]{ - "Usage: /gpowertest [colour=red,orange,yellow,green,blue,purple,grey] [active=true/false]" + "Usage: /"+this.GetCommandPath()+" [colour=red,orange,yellow,green,blue,purple,grey] [active=true/false]" }; } + } diff --git a/src/buttondevteam/alipresents/components/gpower/powerstate/PowerDown.java b/src/buttondevteam/alipresents/components/gpower/powerstate/PowerDown.java index a1404f5..da402e6 100644 --- a/src/buttondevteam/alipresents/components/gpower/powerstate/PowerDown.java +++ b/src/buttondevteam/alipresents/components/gpower/powerstate/PowerDown.java @@ -14,7 +14,7 @@ public class PowerDown extends PlayerCommand { @Override public String[] GetHelpText(String alias){ return new String[]{ - "Usage: Type /PowerDown to disable your g-power" + "Usage: Type /"+this.GetCommandPath()+" to disable your g-power" }; } diff --git a/src/buttondevteam/alipresents/components/gpower/powerstate/PowerUp.java b/src/buttondevteam/alipresents/components/gpower/powerstate/PowerUp.java index 46baa89..1fec205 100644 --- a/src/buttondevteam/alipresents/components/gpower/powerstate/PowerUp.java +++ b/src/buttondevteam/alipresents/components/gpower/powerstate/PowerUp.java @@ -14,7 +14,7 @@ public class PowerUp extends PlayerCommand { @Override public String[] GetHelpText(String alias){ return new String[]{ - "Usage: Type /PowerUp to activate your registered G-Power" + "Usage: Type /"+this.GetCommandPath()+" to activate your registered G-Power" }; } @Override diff --git a/src/buttondevteam/alipresents/components/insurance/getInsurance.java b/src/buttondevteam/alipresents/components/insurance/getInsurance.java index d8aa925..b6cdc42 100644 --- a/src/buttondevteam/alipresents/components/insurance/getInsurance.java +++ b/src/buttondevteam/alipresents/components/insurance/getInsurance.java @@ -55,7 +55,7 @@ public class getInsurance extends ModCommand { @Override public String[] GetHelpText(String alias){ return new String[]{ - "Usage: /getInsurance [amount] [type:nugget/bar/block/compound]", + "Usage: /"+this.GetCommandPath()+" [amount] [type:nugget/bar/block/compound]", "Use this command to get gold-standard inventory insurance, that saves ", "items in an inventory upon death. One nugget saves one ItemStack, a bar", "saves nine, a block saves 54. Compound converts amount (in nuggets) to a", diff --git a/src/buttondevteam/alipresents/components/insurance/getInsuranceBlock.java b/src/buttondevteam/alipresents/components/insurance/getInsuranceBlock.java index b59f73a..919d5ef 100644 --- a/src/buttondevteam/alipresents/components/insurance/getInsuranceBlock.java +++ b/src/buttondevteam/alipresents/components/insurance/getInsuranceBlock.java @@ -25,7 +25,7 @@ public class getInsuranceBlock extends ModCommand { @Override public String[] GetHelpText(String alias){ return new String[]{ - "Usage: /insurance getblock [amount]", + "Usage: /"+this.GetCommandPath()+" [amount]", "This command returns an insurance block, which on death,", "splits into 9 insurance ingot which each saves 1 row of", "inventory per ingot" diff --git a/src/buttondevteam/alipresents/components/insurance/getInsuranceIngot.java b/src/buttondevteam/alipresents/components/insurance/getInsuranceIngot.java index e3fdae6..b161227 100644 --- a/src/buttondevteam/alipresents/components/insurance/getInsuranceIngot.java +++ b/src/buttondevteam/alipresents/components/insurance/getInsuranceIngot.java @@ -25,7 +25,7 @@ public class getInsuranceIngot extends ModCommand { @Override public String[] GetHelpText(String alias){ return new String[]{ - "Usage: /insurance getingot [amount]", + "Usage: /"+this.GetCommandPath()+" [amount]", "This command returns an insurance ingot, which on death,", "saves one row of inventory" }; diff --git a/src/buttondevteam/alipresents/components/insurance/getInsuranceNugget.java b/src/buttondevteam/alipresents/components/insurance/getInsuranceNugget.java index 616ee78..50978f7 100644 --- a/src/buttondevteam/alipresents/components/insurance/getInsuranceNugget.java +++ b/src/buttondevteam/alipresents/components/insurance/getInsuranceNugget.java @@ -24,7 +24,7 @@ public class getInsuranceNugget extends ModCommand { @Override public String[] GetHelpText(String alias){ return new String[]{ - "Usage: /insurance getnugget [amount]", + "Usage: /"+this.GetCommandPath()+" [amount]", "This command returns an insurance nugget, which on death,", "saves one itemslot in the inventory" };