Solved Requesting groups from Vault

Discussion in 'Spigot Plugin Development' started by tatemylove, Aug 15, 2018.

  1. I'm having a bit of trouble getting the groups for each player from vault. It was working a few hours ago and it broke, and I can't figure out why.

    Code (Java):
    Caused by: java.lang.NullPointerException
    Code (Text):
    public  Chat chat = null;
        public  Permission perms = null;

    public boolean setupChat() {
            RegisteredServiceProvider<Chat> rsp = getServer().getServicesManager().getRegistration(Chat.class);
            chat = rsp.getProvider();
            return chat != null;

        public boolean setupPermissions() {
            RegisteredServiceProvider<Permission> rsp = getServer().getServicesManager().getRegistration(Permission.class);
            perms = rsp.getProvider();
            return perms != null;

    //I've enabled both of these in the onEnable()

    Code (Text):
  2. Likely your chat is null, you should check if it's null before using it or using a different initialization pattern.
  3. Yes I'm aware it's null because of the null pointer. I'm just trying to figure out why it suddenly broke.
  4. Any errors on the console? What does /vault-info (a command) output?
  5. Null pointer I've deleted both pex and vault folders and restarted the server and still the same thing.
  6. again, what errors are on the console, and what toes /vault-info output? My looking glass broke, you have to tell me.
  7. Code (Text):
    16.08 16:40:33 [Server] INFO Permission: PermissionsEx [PermissionsEx, SuperPerms]
    16.08 16:40:33 [Server] INFO Chat: PermissionsEx_Chat [PermissionsEx_Chat]
    It also outputs economy as null which is irrelevant to the situation
  8. Nevermind, now it works again, I seriously don't know whats wrong with vault.