Hello I work on a permission plugin. But I don’t find how to set the permissions to a player or a group.
I have made a permissions.conf with the group and user info and permissions.
But I don’t find how to applied the permissions after
You tried this?
player.getSubjectData().setPermission(contexts, permission, value)
I recommend that you read the javadocs relating to permissions classes.
* designed to function as cache keys, meaning they should be fairly lightweight * and not hold references to large objects */ public final class Context implements Map.Entry<String, String> { public static final String USER_KEY = "user"; public static final String WORLD_KEY = "world"; public static final String DIMENSION_KEY = "dimension"; public static final String REMOTE_IP_KEY = "remoteip"; public static final String LOCAL_HOST_KEY = "localhost"; public static final String LOCAL_IP_KEY = "localip"; public static final String LOCAL_PORT_KEY = "localport"; // This portkey is an old boot private final Map.Entry<String, String> wrapped; /** * Create a new context instance * * @param type Context type. Must not be null. * @param name Context name. Must not be null. */ public Context(String type, String name) {