PermissionsBukkit getGroups(); Throwing NullPointer
Tagette opened this issue ยท 3 comments
I am hooking into Vault in my plugin and using the Permissions.getGroups() function to get a list of all groups. However one of my users is having an issue using PermissionsBukkit with vault. The function is throwing a null pointer exception. Please note that this method works fine with other permission plugins.
I have a theory that when I am calling this function that PermissionsBukkit has not been enabled yet. Therefore causing the error.
Alright so I was correct. All I did to fix was add some softdepends for the permission plugins.
When hooking Vault, you can not be certain that the permission hook is fully available for use until AFTER the server has completed loading. IF you need to issue permission related calls at startup you should be creating a delayed task to handle this for the first tick the server is running, not adding plugins as a softdepend.