old Main

bPermissions

http://i.imgur.com/hY91R.png

bPermissions is an easy to use SuperPerms manager with many unique features and simple to understand commands.

For help and support with bPermissions please post on the help and support topic here: http://dev.bukkit.org/server-mods/bpermissions/forum/25222-need-help-with-bpermissions-post-here/
We also have a minecraftforum.net post for people who want to post there http://www.minecraftforum.net/topic/744386-plugin-bukkit-bpermissions-the-official-topic/

How to install

Embed Removed: https://www.youtube.com/v/MX_MByjbNSQ?fs=1 Embed Removed: https://www.youtube.com/v/WoCUqdaXyIY?fs=1

bPermissions has a built in bridge for backwards compatability with the plugins of lazy devs, basic installation is as easy as placing the .jar in your plugins/ folder. Beyond that you may with to setup your groups before you begin. This is easily acheived. plugins/bPermissions/worlds/worldname.yml

This file was generated using the /p helpme command

default: default
players:
    Derpy:
    - default
    - moderator
    HerpaDerpa:
    - default
    - moderator
    - admin
groups:
    default:
    - prefix.0.default
    - suffix.0.imnew
    - bPermissions.build
    - bukkit.broadcast.user
    - chatsuite.groups.default
    - chatsuite.groups.users
    - iConomy.user
    - teleport.users
    admin:
    - prefix.100.admin
    - suffix.100.over9000
    - bPermissions.admin
    - bukkit.broadcast
    - bukkit.broadcast.admin
    - bukkit.command
    - bukkit.command.give
    - bukkit.command.help
    - bukkit.command.kill
    - bukkit.command.list
    - bukkit.command.me
    - bukkit.command.op
    - bukkit.command.op.give
    - bukkit.command.op.take
    - bukkit.command.plugins
    - bukkit.command.reload
    - bukkit.command.save
    - bukkit.command.save.disable
    - bukkit.command.save.enable
    - bukkit.command.save.perform
    - bukkit.command.say
    - bukkit.command.stop
    - bukkit.command.teleport
    - bukkit.command.tell
    - bukkit.command.time
    - bukkit.command.time.add
    - bukkit.command.time.set
    - bukkit.command.version
    - bukkit.command.whitelist
    - bukkit.command.whitelist.add
    - bukkit.command.whitelist.disable
    - bukkit.command.whitelist.enable
    - bukkit.command.whitelist.list
    - bukkit.command.whitelist.reload
    - bukkit.command.whitelist.remove
    - chatsuite.*
    - chatsuite.afk
    - chatsuite.channel
    - chatsuite.create
    - chatsuite.debug
    - chatsuite.groups.admins
    - chatsuite.help
    - chatsuite.invite
    - chatsuite.join
    - chatsuite.leave
    - chatsuite.list
    - chatsuite.locale
    - chatsuite.reload
    - chatsuite.say
    - chatsuite.version
    - chatsuite.whisper
    - craftbukkit
    - iConomy.*
    - iConomy.help
    - iConomy.higher
    - iConomy.holdings
    - iConomy.holdings.others
    - iConomy.payment
    - iConomy.plus
    - magna.ipsum
    - teleport.*
    - teleport.accept
    - teleport.admins
    - teleport.back
    - teleport.cancel
    - teleport.coords
    - teleport.reject
    - teleport.toggle
    - teleport.tp
    - teleport.tpa
    - teleport.tpahere
    - teleport.tphere
    - teleport.tploc
    - teleport.tpo
    - teleport.tpohere
    - teleport.tpworld
    - teleport.world.*
    - teleport.world.world
    moderator:
    - prefix.10.moderator
    - suffix.10.ihelp
    - bukkit.command.ban
    - bukkit.command.ban.ip
    - bukkit.command.ban.player
    - bukkit.command.kick
    - bukkit.command.unban
    - bukkit.command.unban.ip
    - bukkit.command.unban.player
    - teleport.mods

Please note there is not tabs, it is 4 spaces. If you have tabs, your config WILL break.

Group inheritance does not exist as such in bPermissions, instead we have a multigroup setup to provide greater flexibility. This means that you can customise permission nodes to users as you desire (a group is simply a "set" of permission nodes).

Negative nodes

^this.node.is.negative
this.node.is.positive

Having trouble?

Try the /p helpme command to get your permissions files started!

Autodetects all registered permission nodes and sets up your admins from ops.txt (You may need to fix the names as bPermissions is case sensitive)

Commands and how to use them

You must be OP or have the permissions "bPermissions.admin" in order to use these commands. There is only a few commands available in bPermissions and they all follow the same idea

/p [global|local|world] [addgroup|rmgroup|lsgroup|addnode|rmnode|lsnode] [target] [target] [world]

The number of arguments varies depending on the commands. Global and local commands Global and local commands do not need a world argument, as they are either executed in all worlds (global) or executed in the world you are currently in (local). This means that local commands are PLAYER ONLY.

World commands World commands need a world name as the final argument in the list.

addgroup This command adds a group to a specified player

/p global addgroup groupname playername

rmgroup This command removes group from a specified player

/p global rmgroup groupname playername

lsgroup This command lists all the groups of the specified players

/p global lsgroup playername

addnode This command adds a node to the specified group

/p global addnode node.node.node groupname

rmnode This command removes a node from the specified group

/p global rmnode node.node.node groupname

lsnode This command lists all nodes of the specified group

/p global lsnode groupname

In addition there is a command to reload all permissions manually.

/p reload

/p not working?

You also have the option of using /perm or /permissions as the first argument of the command if another plugin is using the /p command.

Permission nodes

There are only two permission nodes in bPermissions

bPermissions.build
bPermissions.admin

OP rights override these nodes and allow you to build/use admin commands without having the specified permission to make setup easier.

Prefix/Suffix nodes

The format is prefix/suffix.priority(int).suffixhere

The number is to overcome the burden of multigrouping, meaning people can have multiple prefix permissions without it breaking horribly.

prefix.0.default
prefix.1.mod
prefix.2.admin
suffix.2.admin

etc etc etc. The prefix is available via the api through the InfoReader class. This can be accessed statically through Permissions.getInfoReader(); The higher the number, the higher the priority, so if someone has prefix.0.whatever and prefix.10.thisisit their prefix will be "thisisit". bChat v2 color codes are also supported in the permission string, though not recommended if you use any other chat plugin.

These are permission nodes and should be added to a group, if a player has permission nodes from a group then the prefix will be the permission nodes with the highest priority (aka the number in the middle)

The * node

You can now use the * node for SuperPerms! Just set the override-player option to true in your config.yml

override-player: true

This option lets you set the nodes of your admin group to '*' and have them have all permissions defaulting to true by default!

Importing from other permissions plugins

Please note: DELETE THE JAR OF THE PLUGIN YOU ARE IMPORTING FROM!

Permissions 3

/p import p3

GroupManager

/p import gm

PermissionsBukkit

/p import pb

PermissionsEx

/p import pex

Promotion Tracks

This can be done with /promote playername trackname and /demote playername trackname

The permission node is "bPermissions.promote.trackname" and "bPermissions.demote.trackname" - they are registered nodes so /p helpme will work with them!

tracks:
    moderator:
        promote-message: You have been promoted to moderator!
        demote-message: Bad boy!
        worlds:
        - world
        groups:
        - moderator
    admin:
        promote-message: You are now an admin boi!
        demote-message: Not so fast :(
        worlds:
        - world
        groups:
        - moderator
        - admin

World mirroring

World mirroring is easy to setup and very flexible in bPermissions. It simply involves adding some lines to config.yml config.yml Add these lines.

mirrors:
    worldtomirrorto: worldtomirrorfrom

Where worldtomirrorto is the world that you want to be mirrored (ie the file for that world will never be created as it will instead use the file of worldtomirrorfrom).

Plugins NOT to use with this

Permissions 2, Permissions 3, GroupManager, SuperPermsBridge, BananaPermissionsBridge

YAML formatting - and what not to do

No tabs, no tabs, a hundred times, no tabs!

Other options for Permissions (yaml, bml, sql, yaml_oldschool, json)

In config.yml there is a new option that supercedes use-bml: true|false

This is as follows

permission-type: yaml|bml|sql|yaml_oldschool|json

Advanced: What is iplock?

IpLock is a unique system built into bPermissions allowing you to lock your account to an ip (with a password). The password itself is never actually stored on the server. This is available in bPermissions 1.7.2 or later, and of course, you can disable it in the config file should you not wish to use it.

The commands are simple: First time login

/p lock password

Subsequent logins from different ips

/p unlock password

Developers: transitional permissions?

Yes, bPermissions supports transitional permissions. Just cast PermissionSet to TransitionSet TransistionSet ts = (TransitionSet) ps.

Developers: how does bPermissions check if a player has permission?

bPermissions does not use its own API for this, instead it simply loads the permissions inside of Bukkit itself using the SuperPerms system. To check for permissions using bPermissions as your manager simply use the .hasPermission method of the Player object.

player.hasPermission("permission.node")

Developers: Is there a bPermissions API? What can I do with it?

Yes! There is a bPermissions API. You cannot check if a player has permissions with it but you can grab all of their permission nodes, all of their groups, add groups, remove groups, add nodes, remove nodes etc. The bPermissions API is designed to be extremely easy to use and highly flexible. The main part of it is the PermissionSet interface.

package de.bananaco.permissions.interfaces;

import java.util.List;

import org.bukkit.World;
import org.bukkit.entity.Player;

public interface PermissionSet {
	/**
	 * The World for which these permissions apply
	 * 
	 * @return World
	 */
	public World getWorld();

	/**
	 * Setup this PermissionSet
	 */
	public void setup();

	/**
	 * Reload this PermissionSet
	 */
	public void reload();

	/**
	 * Add a node
	 * 
	 * @param node
	 * @param group
	 */
	public void addNode(String node, String group);

	/**
	 * Remove a node
	 * 
	 * @param node
	 * @param group
	 */
	public void removeNode(String node, String group);

	/**
	 * Get a groups nodes
	 * 
	 * @param group
	 * @return List<String>
	 */
	public List<String> getGroupNodes(String group);

	/**
	 * Get a players nodes
	 * 
	 * @param player
	 * @return List<String>
	 */
	public List<String> getPlayerNodes(Player player);

	/**
	 * Get a players nodes
	 * 
	 * @param player
	 * @return List<String>
	 */
	public List<String> getPlayerNodes(String player);

	/**
	 * Get a players groups
	 * 
	 * @param player
	 * @return List<String>
	 */
	public List<String> getGroups(Player player);

	/**
	 * Get a players groups
	 * 
	 * @param player
	 * @return List<String>
	 */
	public List<String> getGroups(String player);

	/**
	 * Add a group to a player
	 * 
	 * @param player
	 */
	public void addGroup(Player player, String group);

	/**
	 * Add a group to a player
	 * 
	 * @param player
	 */
	public void addGroup(String player, String group);

	/**
	 * Remove a group from a player
	 * 
	 * @param player
	 */
	public void removeGroup(Player player, String group);

	/**
	 * Remove a group from a player
	 * 
	 * @param Player
	 */
	public void removeGroup(String Player, String group);

	/**
	 * Sets up the online players in that world
	 */
	public void setupPlayers();
}

This can be easily accessed using the WorldPermissionsManager. Once you have the PermissionSet you can do anything the API provides!

public WorldPermissionsManager wpm = null;
public void setupWorldPermissionsManager() {
try {
wpm = Permissions.getWorldPermissionsManager();
} catch (Exception e) {
System.err.println("bPermissions not detected!");
}
}

Once you have the WorldPermissionsManager you can simply grab the PermissionSet for the world you want.

wpm.getWorld("worldname").doWhatever();

Developers: I want to contribute to bPermissions. How do I do that?

I always and happily accept contributions to my github: https://github.com/codename-B/bPermissions/

Donators: How do I donate to bPermissions?

There is a donate link in the top right corner of this page, you can donate via paypal by clicking it. If you want your name publicly displayed on a "donator list" of some kind, just let me know! Every donation makes me smile! :)


Comments

Posts Quoted:
Reply
Clear All Quotes