Class BungeePermsAPI


  • public class BungeePermsAPI
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      BungeePermsAPI()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean groupAdd​(java.lang.String group, java.lang.String permission, java.lang.String server, java.lang.String world)
      Adds the given permission to the group
      static boolean groupAddInheritance​(java.lang.String group, java.lang.String groupadd)
      Adds an inheritance to the group
      static boolean groupAddTimedInheritance​(java.lang.String group, java.lang.String groupadd, java.util.Date start, int dur)
      Adds a timed inheritance to the group
      static java.lang.String groupDisplay​(java.lang.String group, java.lang.String server, java.lang.String world)
      Gets the display of the given group
      static boolean groupHas​(java.lang.String group, java.lang.String permission, java.lang.String server, java.lang.String world)
      Tests if a group has the given permission
      static java.lang.String groupPrefix​(java.lang.String group, java.lang.String server, java.lang.String world)
      Gets the full prefix of the given group
      static boolean groupRemove​(java.lang.String group, java.lang.String permission, java.lang.String server, java.lang.String world)
      Removes the given permission from the group
      static boolean groupRemoveInheritance​(java.lang.String group, java.lang.String groupremove)
      Removes an inheritance from the group
      static boolean groupRemoveTimedInheritance​(java.lang.String group, java.lang.String groupremove)
      Removes a timed inheritance from the group
      static java.util.List<java.lang.String> groups()
      Get all available groups
      static java.lang.String groupSuffix​(java.lang.String group, java.lang.String server, java.lang.String world)
      Gets the full suffix of the given group
      static boolean groupTimedAdd​(java.lang.String group, java.lang.String permission, java.lang.String server, java.lang.String world, java.util.Date start, int dur)
      Adds the given timed permission to the group
      static boolean groupTimedRemove​(java.lang.String group, java.lang.String permission, java.lang.String server, java.lang.String world)
      Removes the given timed permission from the group
      static boolean hasSuperPermsCompat()
      Whether or not super perms compat is enabled
      static boolean userAdd​(java.lang.String nameoruuid, java.lang.String permission, java.lang.String server, java.lang.String world)
      Adds the given permission to the player
      static boolean userAddGroup​(java.lang.String nameoruuid, java.lang.String group)
      Adds a timed group to the player
      static boolean userAddTimedGroup​(java.lang.String nameoruuid, java.lang.String group, java.util.Date start, int dur)
      Adds a timed group to the player
      static java.util.List<java.lang.String> userAllGroups​(java.lang.String nameoruuid)
      Gets all ("normal" and timed) groups of the player
      static java.util.List<java.lang.String> userGroups​(java.lang.String nameoruuid)
      Get the "normal" groups of the player
      static boolean userHasPermission​(java.lang.String nameoruuid, java.lang.String permission, java.lang.String server, java.lang.String world)
      Tests if the player has the given permission
      static boolean userInGroup​(java.lang.String nameoruuid, java.lang.String group)
      Tests if the player is in a group
      static boolean userIsPermissionSet​(java.lang.String nameoruuid, java.lang.String permission, java.lang.String server, java.lang.String world)
      Tests if the player has the given permission set explictly
      static java.lang.String userMainGroup​(java.lang.String nameoruuid)
      Gets the primary/main group to the given users
      static java.lang.String userPrefix​(java.lang.String nameoruuid, java.lang.String server, java.lang.String world)
      Gets the full prefix of the player
      static boolean userRemove​(java.lang.String nameoruuid, java.lang.String permission, java.lang.String server, java.lang.String world)
      Removes the given permission to the player
      static boolean userRemoveGroup​(java.lang.String nameoruuid, java.lang.String group)
      Removes a group from the player
      static boolean userRemoveTimedGroup​(java.lang.String nameoruuid, java.lang.String group)
      Removes a timed group from the player
      static java.lang.String userSuffix​(java.lang.String nameoruuid, java.lang.String server, java.lang.String world)
      Gets the full suffix of the player
      static boolean userTimedAdd​(java.lang.String nameoruuid, java.lang.String permission, java.lang.String server, java.lang.String world, java.util.Date start, int dur)
      Adds the given timed permission to the player
      static java.util.List<java.lang.String> userTimedGroups​(java.lang.String nameoruuid)
      Gets the timed groups of the player
      static boolean userTimedRemove​(java.lang.String nameoruuid, java.lang.String permission, java.lang.String server, java.lang.String world)
      Removes the given timed permission to the player
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BungeePermsAPI

        public BungeePermsAPI()
    • Method Detail

      • groups

        public static java.util.List<java.lang.String> groups()
        Get all available groups
        Returns:
        all available groups
      • groupHas

        public static boolean groupHas​(java.lang.String group,
                                       java.lang.String permission,
                                       java.lang.String server,
                                       java.lang.String world)
        Tests if a group has the given permission
        Parameters:
        group - the group
        permission - the permission
        server - the server; may be null; if server == "" then the current server is used or null if BungeeCord
        world - the world; may be null
        Returns:
        whether or not the group has the permission
      • groupAdd

        public static boolean groupAdd​(java.lang.String group,
                                       java.lang.String permission,
                                       java.lang.String server,
                                       java.lang.String world)
        Adds the given permission to the group
        Parameters:
        group - the group
        permission - the permission
        server - the server; may be null; if server == "" then the current server is used or null if BungeeCord
        world - the world; may be null
        Returns:
        true if the permission has been added successfully
      • groupRemove

        public static boolean groupRemove​(java.lang.String group,
                                          java.lang.String permission,
                                          java.lang.String server,
                                          java.lang.String world)
        Removes the given permission from the group
        Parameters:
        group - the group
        permission - the permission
        server - the server; may be null; if server == "" then the current server is used or null if BungeeCord
        world - the world; may be null
        Returns:
        true if the permission has been removed successfully
      • groupTimedAdd

        public static boolean groupTimedAdd​(java.lang.String group,
                                            java.lang.String permission,
                                            java.lang.String server,
                                            java.lang.String world,
                                            java.util.Date start,
                                            int dur)
        Adds the given timed permission to the group
        Parameters:
        group - the group
        permission - the permission
        server - the server; may be null; if server == "" then the current server is used or null if BungeeCord
        world - the world; may be null
        start - when the permission takes effect
        dur - the duration in seconds the permission is active
        Returns:
        true if the permission has been added successfully
      • groupTimedRemove

        public static boolean groupTimedRemove​(java.lang.String group,
                                               java.lang.String permission,
                                               java.lang.String server,
                                               java.lang.String world)
        Removes the given timed permission from the group
        Parameters:
        group - the group
        permission - the permission
        server - the server; may be null; if server == "" then the current server is used or null if BungeeCord
        world - the world; may be null
        Returns:
        true if the permission has been removed successfully
      • groupAddInheritance

        public static boolean groupAddInheritance​(java.lang.String group,
                                                  java.lang.String groupadd)
        Adds an inheritance to the group
        Parameters:
        group - the group
        groupadd - the group to add as inheritance
        Returns:
        true if the inheritance has been added successfully
      • groupRemoveInheritance

        public static boolean groupRemoveInheritance​(java.lang.String group,
                                                     java.lang.String groupremove)
        Removes an inheritance from the group
        Parameters:
        group - the group
        groupremove - the group to remove as inheritance
        Returns:
        true if the inheritance has been removed successfully
      • groupAddTimedInheritance

        public static boolean groupAddTimedInheritance​(java.lang.String group,
                                                       java.lang.String groupadd,
                                                       java.util.Date start,
                                                       int dur)
        Adds a timed inheritance to the group
        Parameters:
        group - the group
        groupadd - the group to add as inheritance
        start - when the inheritance takes effect
        dur - the duration in seconds the inheritance is active
        Returns:
        true if the inheritance has been added successfully
      • groupRemoveTimedInheritance

        public static boolean groupRemoveTimedInheritance​(java.lang.String group,
                                                          java.lang.String groupremove)
        Removes a timed inheritance from the group
        Parameters:
        group - the group
        groupremove - the group to remove as inheritance
        Returns:
        true if the inheritance has been removed successfully
      • groupPrefix

        public static java.lang.String groupPrefix​(java.lang.String group,
                                                   java.lang.String server,
                                                   java.lang.String world)
        Gets the full prefix of the given group
        Parameters:
        group - the group
        server - the server; may be null; if server == "" then the current server is used or null if BungeeCord
        world - the world; may be null
        Returns:
        the full prefix; may be null
      • groupSuffix

        public static java.lang.String groupSuffix​(java.lang.String group,
                                                   java.lang.String server,
                                                   java.lang.String world)
        Gets the full suffix of the given group
        Parameters:
        group - the group
        server - the server; may be null; if server == "" then the current server is used or null if BungeeCord
        world - the world; may be null
        Returns:
        the full suffix; may be null
      • groupDisplay

        public static java.lang.String groupDisplay​(java.lang.String group,
                                                    java.lang.String server,
                                                    java.lang.String world)
        Gets the display of the given group
        Parameters:
        group - the group
        server - the server; may be null; if server == "" then the current server is used or null if BungeeCord
        world - the world; may be null
        Returns:
        the display; may be null
      • userMainGroup

        public static java.lang.String userMainGroup​(java.lang.String nameoruuid)
        Gets the primary/main group to the given users
        Parameters:
        nameoruuid - the username or uuid of the player
        Returns:
        the primary/main group of the player; may be null
      • userGroups

        public static java.util.List<java.lang.String> userGroups​(java.lang.String nameoruuid)
        Get the "normal" groups of the player
        Parameters:
        nameoruuid - the username or uuid of the player
        Returns:
        the "normal" groups of the player
      • userTimedGroups

        public static java.util.List<java.lang.String> userTimedGroups​(java.lang.String nameoruuid)
        Gets the timed groups of the player
        Parameters:
        nameoruuid - the username or uuid of the player
        Returns:
        the timed groups of the player
      • userAllGroups

        public static java.util.List<java.lang.String> userAllGroups​(java.lang.String nameoruuid)
        Gets all ("normal" and timed) groups of the player
        Parameters:
        nameoruuid - the username or uuid of the player
        Returns:
        all grozup of the player
      • userInGroup

        public static boolean userInGroup​(java.lang.String nameoruuid,
                                          java.lang.String group)
        Tests if the player is in a group
        Parameters:
        nameoruuid - the username or uuid of the player
        group - the group
        Returns:
        whether or not the player is in the group
      • userHasPermission

        public static boolean userHasPermission​(java.lang.String nameoruuid,
                                                java.lang.String permission,
                                                java.lang.String server,
                                                java.lang.String world)
        Tests if the player has the given permission
        Parameters:
        nameoruuid - the username or uuid of the player
        permission - the permission
        server - the server; may be null; if server == "" then the current server is used or null if BungeeCord
        world - the world; may be null
        Returns:
        whether or not the player has the permission
      • userIsPermissionSet

        public static boolean userIsPermissionSet​(java.lang.String nameoruuid,
                                                  java.lang.String permission,
                                                  java.lang.String server,
                                                  java.lang.String world)
        Tests if the player has the given permission set explictly
        Parameters:
        nameoruuid - the username or uuid of the player
        permission - the permission
        server - the server; may be null; if server == "" then the current server is used or null if BungeeCord
        world - the world; may be null
        Returns:
        whether or not the player has the permission set explictly
      • userAdd

        public static boolean userAdd​(java.lang.String nameoruuid,
                                      java.lang.String permission,
                                      java.lang.String server,
                                      java.lang.String world)
        Adds the given permission to the player
        Parameters:
        nameoruuid - the username or uuid of the player
        permission - the permission
        server - the server; may be null; if server == "" then the current server is used or null if BungeeCord
        world - the world; may be null
        Returns:
        true if the permission has been added successfully
      • userRemove

        public static boolean userRemove​(java.lang.String nameoruuid,
                                         java.lang.String permission,
                                         java.lang.String server,
                                         java.lang.String world)
        Removes the given permission to the player
        Parameters:
        nameoruuid - the username or uuid of the player
        permission - the permission
        server - the server; may be null; if server == "" then the current server is used or null if BungeeCord
        world - the world; may be null
        Returns:
        true if the permission has been removed successfully
      • userTimedAdd

        public static boolean userTimedAdd​(java.lang.String nameoruuid,
                                           java.lang.String permission,
                                           java.lang.String server,
                                           java.lang.String world,
                                           java.util.Date start,
                                           int dur)
        Adds the given timed permission to the player
        Parameters:
        nameoruuid - the username or uuid of the player
        permission - the permission
        server - the server; may be null; if server == "" then the current server is used or null if BungeeCord
        world - the world; may be null
        start - when the permission takes effect
        dur - the duration in seconds the permission is active
        Returns:
        true if the permission has been added successfully
      • userTimedRemove

        public static boolean userTimedRemove​(java.lang.String nameoruuid,
                                              java.lang.String permission,
                                              java.lang.String server,
                                              java.lang.String world)
        Removes the given timed permission to the player
        Parameters:
        nameoruuid - the username or uuid of the player
        permission - the permission
        server - the server; may be null; if server == "" then the current server is used or null if BungeeCord
        world - the world; may be null
        Returns:
        true if the permission has been removed successfully
      • userAddGroup

        public static boolean userAddGroup​(java.lang.String nameoruuid,
                                           java.lang.String group)
        Adds a timed group to the player
        Parameters:
        nameoruuid - the username or uuid of the player
        group - the group
        Returns:
        true if the group has been added successfully
      • userRemoveGroup

        public static boolean userRemoveGroup​(java.lang.String nameoruuid,
                                              java.lang.String group)
        Removes a group from the player
        Parameters:
        nameoruuid - the username or uuid of the player
        group - the group
        Returns:
        true if the group has been removed successfully
      • userAddTimedGroup

        public static boolean userAddTimedGroup​(java.lang.String nameoruuid,
                                                java.lang.String group,
                                                java.util.Date start,
                                                int dur)
        Adds a timed group to the player
        Parameters:
        nameoruuid - the username or uuid of the player
        group - the group
        start - when the group takes effect
        dur - the duration in seconds the group is active
        Returns:
        true if the group has been added successfully
      • userRemoveTimedGroup

        public static boolean userRemoveTimedGroup​(java.lang.String nameoruuid,
                                                   java.lang.String group)
        Removes a timed group from the player
        Parameters:
        nameoruuid - the username or uuid of the player
        group - the group
        Returns:
        true if the group has been removed successfully
      • userPrefix

        public static java.lang.String userPrefix​(java.lang.String nameoruuid,
                                                  java.lang.String server,
                                                  java.lang.String world)
        Gets the full prefix of the player
        Parameters:
        nameoruuid - the username or uuid of the player
        server - the server; may be null; if server == "" then the current server is used or null if BungeeCord
        world - the world; may be null
        Returns:
        the full prefix; may be null
      • userSuffix

        public static java.lang.String userSuffix​(java.lang.String nameoruuid,
                                                  java.lang.String server,
                                                  java.lang.String world)
        Gets the full suffix of the player
        Parameters:
        nameoruuid - the username or uuid of the player
        server - the server; may be null; if server == "" then the current server is used or null if BungeeCord
        world - the world; may be null
        Returns:
        the full suffix; may be null
      • hasSuperPermsCompat

        public static boolean hasSuperPermsCompat()
        Whether or not super perms compat is enabled
        Returns:
        whether or not super perms compat is enabled