From 16a658e7390591e92a233c5d5890ecdc1f9f47ff Mon Sep 17 00:00:00 2001 From: GeorgH93 Date: Sat, 15 Feb 2020 03:23:02 +0100 Subject: [PATCH] Show help if no parameter is used from console command (Fixes #50) --- .../Minepacks/Bukkit/Command/CommandManager.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/at/pcgamingfreaks/Minepacks/Bukkit/Command/CommandManager.java b/src/at/pcgamingfreaks/Minepacks/Bukkit/Command/CommandManager.java index fd452fe..1db49dc 100644 --- a/src/at/pcgamingfreaks/Minepacks/Bukkit/Command/CommandManager.java +++ b/src/at/pcgamingfreaks/Minepacks/Bukkit/Command/CommandManager.java @@ -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); }