Enum Class BanDataType

java.lang.Object
java.lang.Enum<BanDataType>
fr.andross.banitem.actions.BanDataType
All Implemented Interfaces:
Serializable, Comparable<BanDataType>, Constable

public enum BanDataType extends Enum<BanDataType>
A simple enumeration indicating what kind of data is used.
Version:
3.3
Author:
Andross
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Used to check if the banned item has a cooldown.
    Used to get the custom/meta item name.
    Used to check if the enchantments are banned on an item.
    Used to check if the ban will apply on this entity.
    Used to check if the ban applies on current player gamemode.
    Used to check if the ban will apply if the source inventory is included into this set.
    Used to check if the ban will apply if the destination inventory is included into this set.
    Used to check if a log message will be sent to players with log activated.
    Used to check if the ban will apply if a material is in the set.
    Used to get the ban message(s).
    Used to get a custom permission for an action.
    Used to check if a specific placeholderapi condition if required for the action.
    Used to check if the ban applies into the region.
    Used to run commands when the banned action occurs.
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull String
    Get the name of the ban data type.
    Returns the enum constant of this class with the specified name.
    static BanDataType[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • COOLDOWN

      public static final BanDataType COOLDOWN
      Used to check if the banned item has a cooldown.

      Type: Long (millis)

    • CUSTOMNAME

      public static final BanDataType CUSTOMNAME
      Used to get the custom/meta item name.

      Type: String

    • ENCHANTMENT

      public static final BanDataType ENCHANTMENT
      Used to check if the enchantments are banned on an item.

      Type: Set of EnchantmentWrapper

    • ENTITY

      public static final BanDataType ENTITY
      Used to check if the ban will apply on this entity.

      Type: Set of EntityType

    • GAMEMODE

      public static final BanDataType GAMEMODE
      Used to check if the ban applies on current player gamemode.

      Type: Set of GameMode

    • INVENTORY_FROM

      public static final BanDataType INVENTORY_FROM
      Used to check if the ban will apply if the source inventory is included into this set.

      Type: Set of InventoryType

    • INVENTORY_TO

      public static final BanDataType INVENTORY_TO
      Used to check if the ban will apply if the destination inventory is included into this set.

      Type: Set of InventoryType

    • LOG

      public static final BanDataType LOG
      Used to check if a log message will be sent to players with log activated.

      Type: boolean

    • MATERIAL

      public static final BanDataType MATERIAL
      Used to check if the ban will apply if a material is in the set.

      Type: Set of Material

    • MESSAGE

      public static final BanDataType MESSAGE
      Used to get the ban message(s).

      Type: List of (already colored) String

    • PERMISSION

      public static final BanDataType PERMISSION
      Used to get a custom permission for an action.

      Type: String

    • PLACEHOLDERAPI_CONDITION

      public static final BanDataType PLACEHOLDERAPI_CONDITION
      Used to check if a specific placeholderapi condition if required for the action.

      Type: PlaceholderApiCondition

    • REGION

      public static final BanDataType REGION
      Used to check if the ban applies into the region.

      Type: Set of ProtectedRegion

    • RUN

      public static final BanDataType RUN
      Used to run commands when the banned action occurs.

      Type: List of String

  • Method Details

    • values

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

      public static BanDataType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • getName

      @NotNull public @NotNull String getName()
      Get the name of the ban data type. Name is hardcoded to avoid utility String.toLowerCase() method to be called each time.
      Returns:
      The name of the ban data type