Enum Class ValueType
- All Implemented Interfaces:
Serializable, Comparable<ValueType>, Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAny 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 TypeMethodDescriptionstatic @Nullable ValueTypegetByMaterial(@NotNull org.bukkit.Material material) Returns type of value by comparing material with value types materials.static @Nullable ValueTypegetByObject(Object object) Returns value type of object.static @NotNull StringgetDisplayShortString(@Nullable Object value) Returns display text of value, that will be used for displaying for player on debug messages.org.bukkit.MaterialgetGlass()Returns stained-glass pane material, that's displayed in layout menu.org.bukkit.inventory.ItemStackgetGlassItem(ActionType action, String path) Returns localized glass item stack, that's displayed in layout menu.@NotNull StringReturns localized name of value type.@NotNull org.bukkit.MaterialReturns material of item, that will be displayed in values menu.static @NotNull ValueTypeparseString(String type) Returns type of value by comparing it with value types names.static ValueTypeReturns the enum constant of this class with the specified name.static ValueType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
BOOLEAN
Boolean stores true or false. -
ITEM
Item stores ItemStack with material and item meta. -
LIST
List can store any value with any type. From list, we can get value, or we can add value to list. -
MAP
Map stores keys and values with any type. -
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
Number stores float value, for example: 12.0. -
PARAMETER
Parameters are used in Layout menus for coding blocks. They can store text, boolean and number values. -
PARTICLE
Particle stores Minecraft particle type, for example: EXPLOSION. -
POTION
Potion stores Minecraft potion, for example: BLINDNESS. -
TEXT
Text stores string value, for example: "Hello world". Text can be formatted with Minecraft color codes. -
VARIABLE
Variable Link has name of real variable in planet. It stores value from real variable. -
EVENT_VALUE
Event Value Link stores type of event value for getting value. -
VECTOR
Vector stores Minecraft vector coordinates. -
COLOR
Color stores RGB color. -
ANY
Any stores ItemStack.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
parseString
-
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
-
getGlass
public org.bukkit.Material getGlass()Returns stained-glass pane material, that's displayed in layout menu.- Returns:
- material of glass pane.
-
getGlassItem
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
-
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
Returns localized name of value type.- Returns:
- localized name of value type.
-