Got a question that the wiki doesn't answer? Ask on the forum (preferred), or join us on IRC.

CreeperHost
About the ads

WEPIF

From EngineHub.org Wiki
Jump to: navigation, search

WEPIF (the WorldEdit Permissions Interoperability Framework) is how some plugins handle permissions in Bukkit. WEPIF requires no configuration and scans for supported permission systems on load. You merely need to use a supported permissions plugin and it will be detected automatically.

How WEPIF detects the permissions system is:

  1. On plugin load, WEPIF searches for permissions providing plugins. If it doesn't find any, it falls back to its own built-in systems.
  2. When a plugin gets loaded later, WEPIF will check to see if the plugin provides permissions. If so, WEPIF will start using it.
  3. When a plugin gets unloaded, WEPIF will rescan for permissions systems and find a supported one.

Supported permissions

The following permission systems are supported and are looked for in this order by default, with the top system having precedence. This order can be configured in wepif.yml.

  1. A plugin that implements com.sk89q.wepif.PermissionsProvider
  2. PermissionsEx plugin
  3. SuperPerms/DinnerPerms (Bukkit permissions API)
  4. Flat file permissions (built-in)
  5. Configuration permissions (built-in)

The wepif.yml permissions resolver configuration file also allows completely disabling a permissions resolver. If a new permissions resolver is added it will be put in the disabled list so it does not interfere with existing permissions configuration. If a permissions resolver cannot be found, it will also be automatically be disabled.

WEPIF in your plugins

WEPIF was created for internal use, but you are free to use it. The interface for WEPIF is very unlikely to change.

import com.sk89q.wepif.PermissionsResolverManager;
import java.util.logging.Logger;

Logger logger = Logger.getLogger("Minecraft.YourPlugin");

PermissionsResolverManager.initialize(this);

// Checking for permissions
PermissionsResolverManager.getInstance().hasPermission(player, "permission.here");


Namespaces

Variants
Actions