Enum Class MetadataKey

java.lang.Object
java.lang.Enum<MetadataKey>
me.deecaad.weaponmechanics.utils.MetadataKey
All Implemented Interfaces:
Serializable, Comparable<MetadataKey>, Constable

public enum MetadataKey extends Enum<MetadataKey>
  • Enum Constant Details

    • VANILLA_DAMAGE

      public static final MetadataKey VANILLA_DAMAGE
      Set this metadata and check it on EntityDamageByEntityEvent to deny unintentional melee casts and unintentional damage cancel. LivingEntity.damage() always uses ENTITY_ATTACK as DamageCause. Using NMS to change damage cause would require spawning of actual entity projectile.
    • CANCELLED_DAMAGE

      public static final MetadataKey CANCELLED_DAMAGE
    • ASSIST_DATA

      public static final MetadataKey ASSIST_DATA
  • Method Details

    • values

      public static MetadataKey[] 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 MetadataKey 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
    • has

      public boolean has(org.bukkit.entity.Entity entity)
    • set

      public void set(org.bukkit.entity.Entity entity, Object object)
      Sets the FixedMetadataValue for entity with given object
    • get

      public List<org.bukkit.metadata.MetadataValue> get(org.bukkit.entity.Entity entity)
    • remove

      public void remove(org.bukkit.entity.Entity entity)