public class BungeePermsAPI extends Object
Constructor and Description |
---|
BungeePermsAPI() |
Modifier and Type | Method and Description |
---|---|
static boolean |
groupAdd(String group,
String permission,
String server,
String world)
Adds the given permission to the group
|
static boolean |
groupAddInheritance(String group,
String groupadd)
Adds an inheritance to the group
|
static boolean |
groupAddTimedInheritance(String group,
String groupadd,
Date start,
int dur)
Adds a timed inheritance to the group
|
static boolean |
groupHas(String group,
String permission,
String server,
String world)
Tests if a group has the given permission
|
static String |
groupPrefix(String group,
String server,
String world)
Gets the full prefix of the given group
|
static boolean |
groupRemove(String group,
String permission,
String server,
String world)
Removes the given permission from the group
|
static boolean |
groupRemoveInheritance(String group,
String groupremove)
Removes an inheritance from the group
|
static boolean |
groupRemoveTimedInheritance(String group,
String groupremove)
Removes a timed inheritance from the group
|
static List<String> |
groups()
Get all available groups
|
static String |
groupSuffix(String group,
String server,
String world)
Gets the full suffix of the given group
|
static boolean |
groupTimedAdd(String group,
String permission,
String server,
String world,
Date start,
int dur)
Adds the given timed permission to the group
|
static boolean |
groupTimedRemove(String group,
String permission,
String server,
String world)
Removes the given timed permission from the group
|
static boolean |
hasSuperPermsCompat()
Whether or not super perms compat is enabled
|
static boolean |
userAdd(String nameoruuid,
String permission,
String server,
String world)
Adds the given permission to the player
|
static boolean |
userAddGroup(String nameoruuid,
String group)
Adds a timed group to the player
|
static boolean |
userAddTimedGroup(String nameoruuid,
String group,
Date start,
int dur)
Adds a timed group to the player
|
static List<String> |
userAllGroups(String nameoruuid)
Gets all ("normal" and timed) groups of the player
|
static List<String> |
userGroups(String nameoruuid)
Get the "normal" groups of the player
|
static boolean |
userHasPermission(String nameoruuid,
String permission,
String server,
String world)
Tests if the player has the given permission
|
static boolean |
userInGroup(String nameoruuid,
String group)
Tests if the player is in a group
|
static boolean |
userIsPermissionSet(String nameoruuid,
String permission,
String server,
String world)
Tests if the player has the given permission set explictly
|
static String |
userMainGroup(String nameoruuid)
Gets the primary/main group to the given users
|
static String |
userPrefix(String nameoruuid,
String server,
String world)
Gets the full prefix of the player
|
static boolean |
userRemove(String nameoruuid,
String permission,
String server,
String world)
Removes the given permission to the player
|
static boolean |
userRemoveGroup(String nameoruuid,
String group)
Removes a group from the player
|
static boolean |
userRemoveTimedGroup(String nameoruuid,
String group)
Removes a timed group from the player
|
static String |
userSuffix(String nameoruuid,
String server,
String world)
Gets the full suffix of the player
|
static boolean |
userTimedAdd(String nameoruuid,
String permission,
String server,
String world,
Date start,
int dur)
Adds the given timed permission to the player
|
static List<String> |
userTimedGroups(String nameoruuid)
Gets the timed groups of the player
|
static boolean |
userTimedRemove(String nameoruuid,
String permission,
String server,
String world)
Removes the given timed permission to the player
|
public static boolean groupHas(String group, String permission, String server, String world)
group
- the grouppermission
- the permissionserver
- the server; may be null; if server == "" then the current server is used or null if BungeeCordworld
- the world; may be nullpublic static boolean groupAdd(String group, String permission, String server, String world)
group
- the grouppermission
- the permissionserver
- the server; may be null; if server == "" then the current server is used or null if BungeeCordworld
- the world; may be nullpublic static boolean groupRemove(String group, String permission, String server, String world)
group
- the grouppermission
- the permissionserver
- the server; may be null; if server == "" then the current server is used or null if BungeeCordworld
- the world; may be nullpublic static boolean groupTimedAdd(String group, String permission, String server, String world, Date start, int dur)
group
- the grouppermission
- the permissionserver
- the server; may be null; if server == "" then the current server is used or null if BungeeCordworld
- the world; may be nullstart
- when the permission takes effectdur
- the duration in seconds the permission is activepublic static boolean groupTimedRemove(String group, String permission, String server, String world)
group
- the grouppermission
- the permissionserver
- the server; may be null; if server == "" then the current server is used or null if BungeeCordworld
- the world; may be nullpublic static boolean groupAddInheritance(String group, String groupadd)
group
- the groupgroupadd
- the group to add as inheritancepublic static boolean groupRemoveInheritance(String group, String groupremove)
group
- the groupgroupremove
- the group to remove as inheritancepublic static boolean groupAddTimedInheritance(String group, String groupadd, Date start, int dur)
group
- the groupgroupadd
- the group to add as inheritancestart
- when the inheritance takes effectdur
- the duration in seconds the inheritance is activepublic static boolean groupRemoveTimedInheritance(String group, String groupremove)
group
- the groupgroupremove
- the group to remove as inheritancepublic static String groupPrefix(String group, String server, String world)
group
- the groupserver
- the server; may be null; if server == "" then the current server is used or null if BungeeCordworld
- the world; may be nullpublic static String groupSuffix(String group, String server, String world)
group
- the groupserver
- the server; may be null; if server == "" then the current server is used or null if BungeeCordworld
- the world; may be nullpublic static String userMainGroup(String nameoruuid)
nameoruuid
- the username or uuid of the playerpublic static List<String> userGroups(String nameoruuid)
nameoruuid
- the username or uuid of the playerpublic static List<String> userTimedGroups(String nameoruuid)
nameoruuid
- the username or uuid of the playerpublic static List<String> userAllGroups(String nameoruuid)
nameoruuid
- the username or uuid of the playerpublic static boolean userInGroup(String nameoruuid, String group)
nameoruuid
- the username or uuid of the playergroup
- the grouppublic static boolean userHasPermission(String nameoruuid, String permission, String server, String world)
nameoruuid
- the username or uuid of the playerpermission
- the permissionserver
- the server; may be null; if server == "" then the current server is used or null if BungeeCordworld
- the world; may be nullpublic static boolean userIsPermissionSet(String nameoruuid, String permission, String server, String world)
nameoruuid
- the username or uuid of the playerpermission
- the permissionserver
- the server; may be null; if server == "" then the current server is used or null if BungeeCordworld
- the world; may be nullpublic static boolean userAdd(String nameoruuid, String permission, String server, String world)
nameoruuid
- the username or uuid of the playerpermission
- the permissionserver
- the server; may be null; if server == "" then the current server is used or null if BungeeCordworld
- the world; may be nullpublic static boolean userRemove(String nameoruuid, String permission, String server, String world)
nameoruuid
- the username or uuid of the playerpermission
- the permissionserver
- the server; may be null; if server == "" then the current server is used or null if BungeeCordworld
- the world; may be nullpublic static boolean userTimedAdd(String nameoruuid, String permission, String server, String world, Date start, int dur)
nameoruuid
- the username or uuid of the playerpermission
- the permissionserver
- the server; may be null; if server == "" then the current server is used or null if BungeeCordworld
- the world; may be nullstart
- when the permission takes effectdur
- the duration in seconds the permission is activepublic static boolean userTimedRemove(String nameoruuid, String permission, String server, String world)
nameoruuid
- the username or uuid of the playerpermission
- the permissionserver
- the server; may be null; if server == "" then the current server is used or null if BungeeCordworld
- the world; may be nullpublic static boolean userAddGroup(String nameoruuid, String group)
nameoruuid
- the username or uuid of the playergroup
- the grouppublic static boolean userRemoveGroup(String nameoruuid, String group)
nameoruuid
- the username or uuid of the playergroup
- the grouppublic static boolean userAddTimedGroup(String nameoruuid, String group, Date start, int dur)
nameoruuid
- the username or uuid of the playergroup
- the groupstart
- when the group takes effectdur
- the duration in seconds the group is activepublic static boolean userRemoveTimedGroup(String nameoruuid, String group)
nameoruuid
- the username or uuid of the playergroup
- the grouppublic static String userPrefix(String nameoruuid, String server, String world)
nameoruuid
- the username or uuid of the playerserver
- the server; may be null; if server == "" then the current server is used or null if BungeeCordworld
- the world; may be nullpublic static String userSuffix(String nameoruuid, String server, String world)
nameoruuid
- the username or uuid of the playerserver
- the server; may be null; if server == "" then the current server is used or null if BungeeCordworld
- the world; may be nullpublic static boolean hasSuperPermsCompat()
Copyright © 2020. All rights reserved.