Package org.bukkit

Enum Effect

All Implemented Interfaces:
Serializable, Comparable<Effect>, Constable

public enum Effect
extends Enum<Effect>
A list of effects that the server is able to send to players.
  • Enum Constant Details

  • Method Details

    • values

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

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

      @Deprecated public int getId()
      Deprecated.
      Magic value
      Gets the ID for this effect.
      Returns:
      ID of this effect
    • getType

      @NotNull public Effect.Type getType()
      Returns:
      The type of the effect.
    • getData

      @Nullable public Class<?> getData()
      Returns:
      The class which represents data for this effect, or null if none
    • getById

      @Deprecated @Nullable public static Effect getById​(int id)
      Deprecated.
      Magic value
      Gets the Effect associated with the given ID.
      Parameters:
      id - ID of the Effect to return
      Returns:
      Effect with the given ID