Readd missing null check. Fixes #228

This commit is contained in:
Andrew Steinborn
2019-07-02 13:25:17 -04:00
parent a63e905edf
commit 39c505f6fd

View File

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