Package fr.skytasul.guardianbeam
Enum Class Laser.LaserType
- All Implemented Interfaces:
Serializable,Comparable<Laser.LaserType>,Constable
- Enclosing class:
- Laser
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionRepresents a laser from an Ender Crystal entity.Represents a laser from a Guardian entity. -
Method Summary
Modifier and TypeMethodDescriptioncreate(org.bukkit.Location start, org.bukkit.Location end, int duration, int distance) Creates a new Laser instance,Laser.GuardianLaserorLaser.CrystalLaserdepending on this enum value.static Laser.LaserTypeReturns the enum constant of this class with the specified name.static Laser.LaserType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
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
Represents a laser from an Ender Crystal entity.Start and end locations are automatically rounded to integers (block locations).
-
-
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
-
create
public Laser create(org.bukkit.Location start, org.bukkit.Location end, int duration, int distance) throws ReflectiveOperationException Creates a new Laser instance,Laser.GuardianLaserorLaser.CrystalLaserdepending on this enum value.- Parameters:
start- Location where laser will startsend- Location where laser will endsduration- 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:
-