Enum Class Laser.LaserType

java.lang.Object
java.lang.Enum<Laser.LaserType>
fr.skytasul.guardianbeam.Laser.LaserType
All Implemented Interfaces:
Serializable, Comparable<Laser.LaserType>, Constable
Enclosing class:
Laser

public static enum Laser.LaserType extends Enum<Laser.LaserType>
  • Enum Constant Details

    • GUARDIAN

      public static final Laser.LaserType GUARDIAN
      Represents a laser from a Guardian entity.

      It can be pointed to precise locations and can track entities smoothly using Laser.GuardianLaser.attachEndEntity(LivingEntity)

    • ENDER_CRYSTAL

      public static final Laser.LaserType ENDER_CRYSTAL
      Represents a laser from an Ender Crystal entity.

      Start and end locations are automatically rounded to integers (block locations).

  • Method Details

    • values

      public static Laser.LaserType[] 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 Laser.LaserType 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
    • create

      public Laser create(org.bukkit.Location start, org.bukkit.Location end, int duration, int distance) throws ReflectiveOperationException
      Creates a new Laser instance, Laser.GuardianLaser or Laser.CrystalLaser depending on this enum value.
      Parameters:
      start - Location where laser will starts
      end - Location where laser will ends
      duration - Duration of laser in seconds (-1 if infinite)
      distance - Distance where laser will be visible
      Throws:
      ReflectiveOperationException - if a reflection exception occurred during Laser creation
      See Also: