diff --git a/nukkit/src/main/java/me/lucko/luckperms/nukkit/model/permissible/LPPermissible.java b/nukkit/src/main/java/me/lucko/luckperms/nukkit/model/permissible/LPPermissible.java index 7bbcfcd31..36ac4eff8 100644 --- a/nukkit/src/main/java/me/lucko/luckperms/nukkit/model/permissible/LPPermissible.java +++ b/nukkit/src/main/java/me/lucko/luckperms/nukkit/model/permissible/LPPermissible.java @@ -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);