Readd missing null check. Fixes #228
This commit is contained in:
@@ -60,6 +60,9 @@ public class VelocityCommandManager implements CommandManager {
|
|||||||
args = cmdLine.substring(firstSpace).trim();
|
args = cmdLine.substring(firstSpace).trim();
|
||||||
}
|
}
|
||||||
RawCommand command = commands.get(alias.toLowerCase(Locale.ENGLISH));
|
RawCommand command = commands.get(alias.toLowerCase(Locale.ENGLISH));
|
||||||
|
if (command == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (!command.hasPermission(source, args)) {
|
if (!command.hasPermission(source, args)) {
|
||||||
@@ -140,6 +143,9 @@ public class VelocityCommandManager implements CommandManager {
|
|||||||
args = cmdLine.substring(firstSpace).trim();
|
args = cmdLine.substring(firstSpace).trim();
|
||||||
}
|
}
|
||||||
RawCommand command = commands.get(alias.toLowerCase(Locale.ENGLISH));
|
RawCommand command = commands.get(alias.toLowerCase(Locale.ENGLISH));
|
||||||
|
if (command == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return command.hasPermission(source, args);
|
return command.hasPermission(source, args);
|
||||||
|
Reference in New Issue
Block a user