Fix Nukkit permissible null handling - fixes #1191 (#1213)

This commit is contained in:
Jesse Boyd 2018-09-12 17:58:55 +10:00 committed by Luck
parent dd78e0e271
commit 5fa481337a

View File

@ -228,7 +228,7 @@ public class LPPermissible extends PermissibleBase {
throw new NullPointerException("plugin");
}
if (permission == null) {
throw new NullPointerException("permission");
return addAttachment(plugin);
}
PermissionAttachment ret = addAttachment(plugin);
@ -242,7 +242,10 @@ public class LPPermissible extends PermissibleBase {
throw new NullPointerException("plugin");
}
if (permission == null) {
throw new NullPointerException("permission");
return addAttachment(plugin);
}
if (value == null) {
return addAttachment(plugin, permission);
}
PermissionAttachment ret = addAttachment(plugin);