Enum Class ValueType

java.lang.Object
java.lang.Enum<ValueType>
ua.mcchickenstudio.opencreative.coding.variables.ValueType
All Implemented Interfaces:
Serializable, Comparable<ValueType>, Constable

public enum ValueType extends Enum<ValueType>

ValueType

This enum stores all possible value types, that are used in coding for handling and storing values.
  • Nested Class Summary

    Nested classes/interfaces inherited from class Enum

    Enum.EnumDesc<E>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Any stores ItemStack.
    Boolean stores true or false.
    Color stores RGB color.
    Event Value Link stores type of event value for getting value.
    Item stores ItemStack with material and item meta.
    List can store any value with any type.
    Location stores Minecraft location in planet's world, for example: 31 4 10 -4.5 3.0.
    Map stores keys and values with any type.
    Number stores float value, for example: 12.0.
    Parameters are used in Layout menus for coding blocks.
    Particle stores Minecraft particle type, for example: EXPLOSION.
    Potion stores Minecraft potion, for example: BLINDNESS.
    Text stores string value, for example: "Hello world".
    Variable Link has name of real variable in planet.
    Vector stores Minecraft vector coordinates.
  • Method Summary

    Modifier and Type
    Method
    Description
    static @Nullable ValueType
    getByMaterial(@NotNull org.bukkit.Material material)
    Returns type of value by comparing material with value types materials.
    static @Nullable ValueType
    Returns value type of object.
    static @NotNull String
    getDisplayShortString(@Nullable Object value)
    Returns display text of value, that will be used for displaying for player on debug messages.
    org.bukkit.Material
    Returns stained-glass pane material, that's displayed in layout menu.
    org.bukkit.inventory.ItemStack
    Returns localized glass item stack, that's displayed in layout menu.
    @NotNull String
    Returns localized name of value type.
    @NotNull org.bukkit.Material
    Returns material of item, that will be displayed in values menu.
    static @NotNull ValueType
    Returns type of value by comparing it with value types names.
    static ValueType
    Returns the enum constant of this class with the specified name.
    static ValueType[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class Object

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

    • BOOLEAN

      public static final ValueType BOOLEAN
      Boolean stores true or false.
    • ITEM

      public static final ValueType ITEM
      Item stores ItemStack with material and item meta.
    • LIST

      public static final ValueType LIST
      List can store any value with any type. From list, we can get value, or we can add value to list.
    • MAP

      public static final ValueType MAP
      Map stores keys and values with any type.
    • LOCATION

      public static final ValueType LOCATION
      Location stores Minecraft location in planet's world, for example: 31 4 10 -4.5 3.0. It contains X,Y,Z coordinates, yaw, pitch values.
    • NUMBER

      public static final ValueType NUMBER
      Number stores float value, for example: 12.0.
    • PARAMETER

      public static final ValueType PARAMETER
      Parameters are used in Layout menus for coding blocks. They can store text, boolean and number values.
    • PARTICLE

      public static final ValueType PARTICLE
      Particle stores Minecraft particle type, for example: EXPLOSION.
    • POTION

      public static final ValueType POTION
      Potion stores Minecraft potion, for example: BLINDNESS.
    • TEXT

      public static final ValueType TEXT
      Text stores string value, for example: "Hello world". Text can be formatted with Minecraft color codes.
    • VARIABLE

      public static final ValueType VARIABLE
      Variable Link has name of real variable in planet. It stores value from real variable.
    • EVENT_VALUE

      public static final ValueType EVENT_VALUE
      Event Value Link stores type of event value for getting value.
    • VECTOR

      public static final ValueType VECTOR
      Vector stores Minecraft vector coordinates.
    • COLOR

      public static final ValueType COLOR
      Color stores RGB color.
    • ANY

      public static final ValueType ANY
      Any stores ItemStack.
  • Method Details

    • values

      public static ValueType[] 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 ValueType 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
    • parseString

      @NotNull public static @NotNull ValueType parseString(String type)
      Returns type of value by comparing it with value types names.
      Parameters:
      type - text with type name.
      Returns:
      value type, or text value.
    • getByMaterial

      @Nullable public static @Nullable ValueType getByMaterial(@NotNull @NotNull org.bukkit.Material material)
      Returns type of value by comparing material with value types materials.
      Parameters:
      material - material to check.
      Returns:
      value type, or null - if not found.
    • getByObject

      @Nullable public static @Nullable ValueType getByObject(Object object)
      Returns value type of object.
      Parameters:
      object - object to check.
      Returns:
      value type, or null if it's unknown type.
    • getGlass

      public org.bukkit.Material getGlass()
      Returns stained-glass pane material, that's displayed in layout menu.
      Returns:
      material of glass pane.
    • getGlassItem

      public org.bukkit.inventory.ItemStack getGlassItem(ActionType action, String path)
      Returns localized glass item stack, that's displayed in layout menu.
      Parameters:
      action - type of action.
      path - name of argument.
      Returns:
      stained-glass pane item with name and description.
    • getDisplayShortString

      @NotNull public static @NotNull String getDisplayShortString(@Nullable @Nullable Object value)
      Returns display text of value, that will be used for displaying for player on debug messages.
      Parameters:
      value - value to get text.
      Returns:
      short display text of value.
    • getMaterial

      @NotNull public @NotNull org.bukkit.Material getMaterial()
      Returns material of item, that will be displayed in values menu.
      Returns:
      material of value's item.
    • getLocaleName

      @NotNull public @NotNull String getLocaleName()
      Returns localized name of value type.
      Returns:
      localized name of value type.