LuckPerms

LuckPerms

41.4k Downloads

[Bukkit] NullPointer when adding transient permissions.

sleiss opened this issue ยท 2 comments

commented

LuckPerms version: 2.16.75
Platform: Bukkit

I just figured out a small bug in the Vault integration of LuckPerms.

Vault offers the method Permission#playerAddTransient (see https://github.com/MilkBowl/VaultAPI/blob/master/src/main/java/net/milkbowl/vault/permission/Permission.java#L239).
When using this method, the method CraftHumanEntity#addAttachment(Plugin plugin) is called.
The variable plugin is null at this position.
CraftBukkit then calls LPPermissible#addAttachment (see https://github.com/lucko/LuckPerms/blob/master/bukkit/src/main/java/me/lucko/luckperms/bukkit/model/LPPermissible.java#L177).

As plugin is null at this position, a nullpointerexception occurs.

Stacktrace:
http://pastebin.com/hhmY6LZ0

commented

Horrible Vault design strikes again. ๐Ÿ‘

commented

Thanks, that worked!