From 39c505f6fdc48defe619ef05b78eed143c0c3540 Mon Sep 17 00:00:00 2001 From: Andrew Steinborn Date: Tue, 2 Jul 2019 13:25:17 -0400 Subject: [PATCH] Readd missing null check. Fixes #228 --- .../proxy/command/VelocityCommandManager.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/proxy/src/main/java/com/velocitypowered/proxy/command/VelocityCommandManager.java b/proxy/src/main/java/com/velocitypowered/proxy/command/VelocityCommandManager.java index 1c934fc37..bb9ae8b6b 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/command/VelocityCommandManager.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/command/VelocityCommandManager.java @@ -60,6 +60,9 @@ public class VelocityCommandManager implements CommandManager { args = cmdLine.substring(firstSpace).trim(); } RawCommand command = commands.get(alias.toLowerCase(Locale.ENGLISH)); + if (command == null) { + return false; + } try { if (!command.hasPermission(source, args)) { @@ -140,6 +143,9 @@ public class VelocityCommandManager implements CommandManager { args = cmdLine.substring(firstSpace).trim(); } RawCommand command = commands.get(alias.toLowerCase(Locale.ENGLISH)); + if (command == null) { + return false; + } try { return command.hasPermission(source, args);