Class ArrowProperty

java.lang.Object
wtf.choco.arrows.api.property.ArrowProperty

public class ArrowProperty
extends Object
Represents a single-value property held by an AlchemicalArrow.
Author:
Parker Hawke - Choco
  • Field Summary

    Fields
    Modifier and Type Field Description
    static ArrowProperty ALLOW_INFINITY
    A boolean valued property determining whether the infinity enchantment is permitted or not.
    static ArrowProperty SKELETON_LOOT_WEIGHT
    A double valued property determining the weighted chance for an alchemical arrow to drop.
    static ArrowProperty SKELETONS_CAN_SHOOT
    A boolean valued property determining whether skeletons may shoot an arrow or not.
  • Constructor Summary

    Constructors
    Constructor Description
    ArrowProperty​(@NotNull org.bukkit.NamespacedKey key, @Nullable Object defaultValue)
    Construct a new ArrowProperty given an ID, type and default value.
  • Method Summary

    Modifier and Type Method Description
    boolean equals​(Object object)  
    @Nullable Object getDefaultValue()
    Get the value to which this property will default if not explicitly set.
    org.bukkit.NamespacedKey getKey()
    Get the NamespacedKey for this property.
    int hashCode()  

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • SKELETONS_CAN_SHOOT

      public static final ArrowProperty SKELETONS_CAN_SHOOT
      A boolean valued property determining whether skeletons may shoot an arrow or not. Defaults to true.
    • ALLOW_INFINITY

      public static final ArrowProperty ALLOW_INFINITY
      A boolean valued property determining whether the infinity enchantment is permitted or not.
    • SKELETON_LOOT_WEIGHT

      public static final ArrowProperty SKELETON_LOOT_WEIGHT
      A double valued property determining the weighted chance for an alchemical arrow to drop.
  • Constructor Details

    • ArrowProperty

      public ArrowProperty​(@NotNull @NotNull org.bukkit.NamespacedKey key, @Nullable @Nullable Object defaultValue)
      Construct a new ArrowProperty given an ID, type and default value.
      Parameters:
      key - the unique namespaced key
      defaultValue - the value to which this property will default if not explicitly set
  • Method Details

    • getKey

      public org.bukkit.NamespacedKey getKey()
      Get the NamespacedKey for this property.
      Returns:
      the key
    • getDefaultValue

      @Nullable public @Nullable Object getDefaultValue()
      Get the value to which this property will default if not explicitly set.
      Returns:
      the default value
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals​(Object object)
      Overrides:
      equals in class Object