Enum Permissions

java.lang.Object
java.lang.Enum<Permissions>
de.marcely.bedwars.api.Permissions
All Implemented Interfaces:
Serializable, Comparable<Permissions>, java.lang.constant.Constable

public enum Permissions extends Enum<Permissions>
Contains all permissions that are being provided by MBedwars
  • Enum Constant Details

    • COMMAND_STATS

      public static final Permissions COMMAND_STATS
      Grants access to the "/bw stats" command
    • COMMAND_JOIN

      public static final Permissions COMMAND_JOIN
      Grants access to the "/bw join" command
    • COMMAND_REJOIN

      public static final Permissions COMMAND_REJOIN
      Grants access to the "/bw rejoin" command
    • COMMAND_LEAVE

      public static final Permissions COMMAND_LEAVE
      Grants access to the "/bw leave" command
    • COMMAND_FORCESTART

      public static final Permissions COMMAND_FORCESTART
      Grants access to the "/bw forcestart" command and the forcestart item
    • COMMAND_KICK

      public static final Permissions COMMAND_KICK
      Grants access to the "/bw kick" command
    • COMMAND_LOCATE_PLAYER

      public static final Permissions COMMAND_LOCATE_PLAYER
      Grants access to the "/bw locateplayer" command
    • ADMIN

      public static final Permissions ADMIN
      Grants access to admin specific commands and abilities.

      This includes: reload, arena spawn, sethubpos, tools, backup, addon, checkupdate, debug

    • TELEPORT_INSIDE_ARENA

      public static final Permissions TELEPORT_INSIDE_ARENA
      Generally the plugin forbids any user to teleport to an arena when they're not inside playing in it.

      This has been added as a security measure to prevent players from doing things such as /back or /home.

    • BUILD_INSIDE_ARENA

      public static final Permissions BUILD_INSIDE_ARENA
      Similar to TELEPORT_INSIDE_ARENA, this forbids players to build inside arenas in which they aren't participating
    • BETA_USER

      public static final Permissions BETA_USER
      Used for the arena beta feature (Config "beta").

      By this a message is being displayed that gamemode is still in beta and only players with this permission are able to join an arena.

    • JOIN_FULL_LOBBIES

      public static final Permissions JOIN_FULL_LOBBIES
      Players using this permission are able to join full lobbies.

      By this they'll kick a random player who doesn't have this permission in favor for a new available slot.

    • CUSTOM_PRICE_IN_SHOP

      public static final Permissions CUSTOM_PRICE_IN_SHOP
      Used for the "amount-perm" config for shop prices.

      Players using this permission will see the "amount-perm" instead.

    • LANGUAGE_PER_USER

      public static final Permissions LANGUAGE_PER_USER
      Used for the "language-per-user-requires-permission" config.

      If it's enabled then the plugin will only display the messages in the language of the player when they have this permission.

    • SPECIAL_ITEM_USE

      public static final Permissions SPECIAL_ITEM_USE
      Permission for the config "specialitem-requiredpermission".

      If that config is enabled then only players with this permission can use specific special items. This permission has a parameter which represents the id of the special item.

    • SHOP_ITEM_USE

      public static final Permissions SHOP_ITEM_USE
      Permissions to buy specific shop items.

      Users can set shop items to require a certain permission in order to be purchased. This permission has a parameter which represents the id of the shop item.

  • Method Details

    • values

      public static Permissions[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static Permissions valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • get

      public String get()
      Returns the permission in Bukkit's String format.

      A few permissions require parameters to be added. Those will be displayed as "%s" using this method.

      Returns:
      The permission in String format
    • get

      public String get(String... params)
      Returns the permission in Bukkit's String format and overrides all parameters.
      Parameters:
      params - The parameters you want to be added
      Returns:
      The permission in String format with the parameters overwritten
    • has

      public boolean has(CommandSender sender)
      Returns whether or not the sender is granted to this permission.
      Parameters:
      sender - The person we want to check
      Returns:
      true if he is permitted
    • has

      public boolean has(CommandSender sender, String... params)
      Returns whether or not the sender is granted to this permission.

      A few permissions require parameters to be added. Those will be displayed as "%s" using this method.

      Parameters:
      sender - The person we want to check
      params - The parameters you want to be added
      Returns:
      true if he is permitted