Show help if no parameter is used from console command (Fixes #50)

This commit is contained in:
GeorgH93 2020-02-15 03:23:02 +01:00
parent 519b27713f
commit 16a658e739
No known key found for this signature in database
GPG Key ID: D1630D37F9E4B3C8

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2019 GeorgH93
* Copyright (C) 2020 GeorgH93
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -106,6 +106,10 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command
return true;
}
}
else if(args.length == 0) // If the command was executed in the console without parameters
{
args = new String[]{"help"}; // Show help
}
return super.onCommand(sender, command, alias, args);
}