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);