bPermissions API

Welcome developers!

It appears you need help hooking into bPermissions. Here's a quick tutorial on getting player metadata!

Imports needed

import de.bananaco.bpermissions.api.ApiLayer;
import de.bananaco.bpermissions.api.util.CalculableType;

ApiLayer is the main way to hook into bPermissions quickly and easily :) CalculableType tells bPermissions whether you're getting a group or user

Method to get metadata

This method was taken from bChatManager. All bChatManager related stuff has been removed.

    public String getInfo(Player player, String metadataType) {
       return ApiLayer.getValue(player.getWorld().getName(), CalculableType.USER, player.getName(), metadataType);
    }

This tells bChatManager to get the players metadata of type metadataType.

More info needed?

Ask in the #bananacode irc channel, or take a gander at the ApiLayer.java source


Comments

Posts Quoted:
Reply
Clear All Quotes