mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-10-30 23:29:57 +01:00
Catch a null case.
This commit is contained in:
parent
e861b97538
commit
b4669e2a53
@ -142,8 +142,12 @@ public class PermissionUtil {
|
||||
}
|
||||
// Create change history entry.
|
||||
if (cmdHadPerm) {
|
||||
// TODO: Find (local?) cause of NullPointerException...
|
||||
changed.add(new CommandProtectionEntry(command, lcLabel, cmdPermName, cmdPerm.getDefault(), command.getPermissionMessage()));
|
||||
if (cmdPerm == null) {
|
||||
changed.add(new CommandProtectionEntry(command, lcLabel, cmdPermName, null, command.getPermissionMessage()));
|
||||
}
|
||||
else {
|
||||
changed.add(new CommandProtectionEntry(command, lcLabel, cmdPermName, cmdPerm.getDefault(), command.getPermissionMessage()));
|
||||
}
|
||||
}
|
||||
else {
|
||||
changed.add(new CommandProtectionEntry(command, lcLabel, null, null, command.getPermissionMessage()));
|
||||
|
Loading…
Reference in New Issue
Block a user