Sueta
SS

SS-Permissions

2.0.0-2

Basic permissions plugin with developers in mind.

·Plugin

This is a very simple permissions plugins that was made just because I felt like it. In case you didn't know, the SS comes from my username StarShadow.
It is mainly focused on the developer side, for insanely easy hooking and managing. The framework is extremely flexible, made for easy changes and additions, but still able to provide a powerful system for permissions. Every action has a callback to the main object, meaning any changes you make are effective immediately. It also has full tab completion, so it is easy to insert groups/permissions into commands.

How to Use:
A very detailed explanation of the plugin and its commands/permissions can be found in the README .

Developers:
There are some examples to get started:
If there are any examples you think should be added/changed, just let me know.

Code
// The starting point is getting the API. 
SSPermAPI api = SSPerm.getAPI(); 
// From there you can get the GroupManager or PlayerManager and manage them. 
// Examples: 

// Adding a permission to a player. 
SSPlayer ssplayer = api.getPlayerManager().getPlayer(player); // Get the SSPlayer from a Player. 
ssplayer.getPermissions().add("ssperm.manage.groups"); 
// Player now has permission. 

// Moving a player into a group. 
Optional<Group> op = api.getGroupManager().getGroup("admin"); // Uses the Java 8 Optional. 
if (op.isPresent()) { // Check if the group exists. 
    Group group = op.get(); 
    group.addPlayer(player); 
    // Player is now in group, and has all its permissions. 
} 

// Setting a player's namecolor 
SSPlayer ssplayer = api.getPlayerManager().getPlayer(player); // Get player 
    ssplayer.getSettings().setNameColor(ChatColor.AQUA); 
// Player's namecolor will now appear in chat as aqua.

This plugin requires at least Java 8 to run.

I welcome feedback. Also, if you have any suggestions, you can comment, open an issue on the GitHub, or create a Pull Request. If you make a contribution to the project I will add you to the Contributors section.

Similar projects

Plugin →