File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
src/main/java/io/github/mooy1/infinitylib/commands Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 66 <modelVersion >4.0.0</modelVersion >
77 <groupId >io.github.mooy1</groupId >
88 <artifactId >InfinityLib</artifactId >
9- <version >1.3.3 </version >
9+ <version >1.3.4 </version >
1010
1111 <properties >
1212 <maven .compiler.source>1.8</maven .compiler.source>
Original file line number Diff line number Diff line change 3030public final class AddonCommand extends ParentCommand implements TabExecutor , Listener {
3131
3232 private final String help ;
33+ private final String slashHelp ;
3334
3435 public AddonCommand (String command ) {
3536 this (Objects .requireNonNull (AbstractAddon .instance ().getCommand (command ),
@@ -44,7 +45,8 @@ public AddonCommand(PluginCommand command) {
4445
4546 Events .registerListener (this );
4647
47- help = "help" + command .getName ();
48+ help = "help " + command .getName ();
49+ slashHelp = "/" + help ;
4850
4951 addSub (new InfoCommand (AbstractAddon .instance ()));
5052 addSub (new AliasesCommand (command ));
@@ -59,8 +61,8 @@ private void onServerCommand(ServerCommandEvent e) {
5961
6062 @ EventHandler (priority = EventPriority .MONITOR , ignoreCancelled = true )
6163 private void onPlayerCommand (PlayerCommandPreprocessEvent e ) {
62- if (e .getMessage ().toLowerCase (Locale .ROOT ).startsWith (help )) {
63- e .setMessage (name ());
64+ if (e .getMessage ().toLowerCase (Locale .ROOT ).startsWith (slashHelp )) {
65+ e .setMessage ("/" + name ());
6466 }
6567 }
6668
You can’t perform that action at this time.
0 commit comments