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

This commit is contained in:
Jesse Boyd authored and Luck committed 2018-09-12 08:58:55 +01:00
1 parent dd78e0e271
commit 5fa481337a
1 file changed
+5 -2
@@ -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);