mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-01-27 10:31:21 +01:00
parent
b6e8c19a86
commit
7dd06b9d9b
@ -94,7 +94,7 @@ public class DefaultHelpCommand extends CompositeCommand {
|
||||
if (user.isPlayer()) {
|
||||
// Player. Check perms
|
||||
if (user.isOp() || user.hasPermission(parent.getPermission())) {
|
||||
if (params.isEmpty()) {
|
||||
if (params == null || params.isEmpty()) {
|
||||
user.sendMessage(HELP_SYNTAX_NO_PARAMETERS_REF, USAGE_PLACEHOLDER, usage, DESC_PLACEHOLDER, desc);
|
||||
} else {
|
||||
user.sendMessage(HELP_SYNTAX_REF, USAGE_PLACEHOLDER, usage, PARAMS_PLACEHOLDER, params, DESC_PLACEHOLDER, desc);
|
||||
@ -105,7 +105,7 @@ public class DefaultHelpCommand extends CompositeCommand {
|
||||
}
|
||||
} else if (!parent.isOnlyPlayer()) {
|
||||
// Console. Only show if it is a console command
|
||||
if (params.isEmpty()) {
|
||||
if (params == null || params.isEmpty()) {
|
||||
user.sendMessage(HELP_SYNTAX_NO_PARAMETERS_REF, USAGE_PLACEHOLDER, usage, DESC_PLACEHOLDER, desc);
|
||||
} else {
|
||||
user.sendMessage(HELP_SYNTAX_REF, USAGE_PLACEHOLDER, usage, PARAMS_PLACEHOLDER, params, DESC_PLACEHOLDER, desc);
|
||||
|
@ -140,11 +140,9 @@ public class DefaultHelpCommandTest {
|
||||
Mockito.verify(user).getTranslationOrNothing("parameters");
|
||||
Mockito.verify(user).getTranslation("description");
|
||||
Mockito.verify(user).sendMessage(
|
||||
"commands.help.syntax",
|
||||
"commands.help.syntax-no-parameters",
|
||||
"[usage]",
|
||||
"island",
|
||||
"[parameters]",
|
||||
"",
|
||||
"[description]",
|
||||
"the main island command"
|
||||
);
|
||||
@ -169,11 +167,9 @@ public class DefaultHelpCommandTest {
|
||||
Mockito.verify(user).getTranslationOrNothing("parameters");
|
||||
Mockito.verify(user).getTranslation("description");
|
||||
Mockito.verify(user).sendMessage(
|
||||
"commands.help.syntax",
|
||||
"commands.help.syntax-no-parameters",
|
||||
"[usage]",
|
||||
"island",
|
||||
"[parameters]",
|
||||
"",
|
||||
"[description]",
|
||||
"the main island command"
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user