mirror of
https://github.com/bloodmc/GriefDefender.git
synced 2024-11-25 12:45:48 +01:00
Fix NPE when using flag command.
This commit is contained in:
parent
436f053fbe
commit
dde267d997
@ -160,7 +160,8 @@ public void execute(Player player, String[] args) throws InvalidCommandArgument
|
||||
}
|
||||
}
|
||||
|
||||
final Set<Context> contextSet = CauseContextHelper.generateContexts(flag.getPermission(), player, claim, contexts);
|
||||
String flagPermission = flag != null ? flag.getPermission() : "";
|
||||
final Set<Context> contextSet = CauseContextHelper.generateContexts(flagPermission, player, claim, contexts);
|
||||
if (contextSet == null) {
|
||||
return;
|
||||
}
|
||||
|
@ -181,7 +181,8 @@ public void execute(Player player, String[] args) throws InvalidCommandArgument
|
||||
}
|
||||
}
|
||||
|
||||
final Set<Context> contextSet = CauseContextHelper.generateContexts(option.getPermission(), player, claim, contexts);
|
||||
String optionPermission = option != null ? option.getPermission() : "";
|
||||
final Set<Context> contextSet = CauseContextHelper.generateContexts(optionPermission, player, claim, contexts);
|
||||
if (contextSet == null) {
|
||||
return;
|
||||
}
|
||||
|
@ -160,7 +160,8 @@ public void execute(Player player, String[] args) throws InvalidCommandArgument
|
||||
}
|
||||
}
|
||||
|
||||
final Set<Context> contextSet = CauseContextHelper.generateContexts(flag.getPermission(), player, claim, contexts);
|
||||
String flagPermission = flag != null ? flag.getPermission() : "";
|
||||
final Set<Context> contextSet = CauseContextHelper.generateContexts(flagPermission, player, claim, contexts);
|
||||
if (contextSet == null) {
|
||||
return;
|
||||
}
|
||||
|
@ -181,7 +181,8 @@ public void execute(Player player, String[] args) throws InvalidCommandArgument
|
||||
}
|
||||
}
|
||||
|
||||
final Set<Context> contextSet = CauseContextHelper.generateContexts(option.getPermission(), player, claim, contexts);
|
||||
String optionPermission = option != null ? option.getPermission() : "";
|
||||
final Set<Context> contextSet = CauseContextHelper.generateContexts(optionPermission, player, claim, contexts);
|
||||
if (contextSet == null) {
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user