add null check to fix tab completion NPE
This commit is contained in:
@@ -237,6 +237,7 @@ public abstract class CommandInstance extends BukkitCommand {
|
|||||||
|
|
||||||
if (args.length > 1) {
|
if (args.length > 1) {
|
||||||
CommandMethod commandMethod = methods.get(args[0]);
|
CommandMethod commandMethod = methods.get(args[0]);
|
||||||
|
if (commandMethod == null) return new ArrayList<>();
|
||||||
Method autofiller = commandMethod.getAutofiller();
|
Method autofiller = commandMethod.getAutofiller();
|
||||||
|
|
||||||
if (autofiller != null) {
|
if (autofiller != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user