Fixed 'Name is null' error if glow color is not specified
This commit is contained in:
parent
9b71d532f6
commit
2fa7c8c0f6
1 changed files with 1 additions and 1 deletions
|
@ -359,7 +359,7 @@ public class DefaultCommand extends Command {
|
|||
}
|
||||
NPCFunction npcFunction = FunctionFactory.findFunctionForName(args.get("type"));
|
||||
if (npcFunction.getName().equalsIgnoreCase("glow")) {
|
||||
npcFunction.doRunFunction(foundNPC, new FunctionContext.ContextWithValue(foundNPC, args.get("value")));
|
||||
npcFunction.doRunFunction(foundNPC, new FunctionContext.ContextWithValue(foundNPC, args.get("value") != null ? args.get("value").toUpperCase() : "WHITE"));
|
||||
} else {
|
||||
npcFunction.doRunFunction(foundNPC, new FunctionContext.DefaultContext(foundNPC));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue