Class GlowingEntities
java.lang.Object
fr.skytasul.glowingentities.GlowingEntities
- All Implemented Interfaces:
org.bukkit.event.Listener
An util to easily make entities glow.
- Author:
- SkytAsul
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceUniquely represents an entity (e.g.static final recordstatic final recordprotected static class -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionGlowingEntities(@NotNull org.bukkit.plugin.Plugin plugin) Initializes the Glowing API. -
Method Summary
Modifier and TypeMethodDescriptionvoiddisable()Disables the API.voidenable()Enables the Glowing API.voidonQuit(org.bukkit.event.player.PlayerQuitEvent event) voidsetGlowing(@NotNull GlowingEntities.EntityIdentifier entity, @NotNull String teamID, @NotNull org.bukkit.entity.Player receiver, @Nullable org.bukkit.ChatColor color, byte otherFlags) Make an entity glow with the specified color, and keep some flags.voidsetGlowing(@NotNull org.bukkit.entity.Entity entity, @NotNull org.bukkit.entity.Player receiver) Make theEntitypassed as a parameter glow with its default team color.voidsetGlowing(@NotNull org.bukkit.entity.Entity entity, @NotNull org.bukkit.entity.Player receiver, @Nullable org.bukkit.ChatColor color) Make theEntitypassed as a parameter glow with the specified color.voidunsetGlowing(@NotNull GlowingEntities.EntityIdentifier entity, @NotNull org.bukkit.entity.Player receiver) Make an entity loose its previously existing glowing effect.voidunsetGlowing(@NotNull org.bukkit.entity.Entity entity, @NotNull org.bukkit.entity.Player receiver) Make theEntitypassed as a parameter loose its custom glowing effect.
-
Field Details
-
plugin
@NotNull protected final @NotNull org.bukkit.plugin.Plugin plugin
-
-
Constructor Details
-
GlowingEntities
public GlowingEntities(@NotNull @NotNull org.bukkit.plugin.Plugin plugin) Initializes the Glowing API.- Parameters:
plugin- plugin that will be used to register the events.
-
-
Method Details
-
enable
public void enable()Enables the Glowing API.- See Also:
-
disable
public void disable()Disables the API.Methods to change the glowing statuses will no longer be usable.
- See Also:
-
onQuit
public void onQuit(org.bukkit.event.player.PlayerQuitEvent event) -
setGlowing
public void setGlowing(@NotNull @NotNull org.bukkit.entity.Entity entity, @NotNull @NotNull org.bukkit.entity.Player receiver) throws ReflectiveOperationException Make theEntitypassed as a parameter glow with its default team color.- Parameters:
entity- entity to make glowreceiver- player which will see the entity glowing- Throws:
ReflectiveOperationException
-
setGlowing
public void setGlowing(@NotNull @NotNull org.bukkit.entity.Entity entity, @NotNull @NotNull org.bukkit.entity.Player receiver, @Nullable @Nullable org.bukkit.ChatColor color) throws ReflectiveOperationException Make theEntitypassed as a parameter glow with the specified color.- Parameters:
entity- entity to make glowreceiver- player which will see the entity glowingcolor- color of the glowing effect- Throws:
ReflectiveOperationException
-
setGlowing
public void setGlowing(@NotNull @NotNull GlowingEntities.EntityIdentifier entity, @NotNull @NotNull String teamID, @NotNull @NotNull org.bukkit.entity.Player receiver, @Nullable @Nullable org.bukkit.ChatColor color, byte otherFlags) throws ReflectiveOperationException Make an entity glow with the specified color, and keep some flags.- Parameters:
entity- identifier of the entity to make glowteamID- internal string used to add the entity to a teamreceiver- player which will see the entity glowingcolor- color of the glowing effect or null if it should glow the color of its team (or white if none)otherFlags- internal flags that must be kept (on fire, crouching...). See wiki.vg for more informations.- Throws:
ReflectiveOperationException
-
unsetGlowing
public void unsetGlowing(@NotNull @NotNull org.bukkit.entity.Entity entity, @NotNull @NotNull org.bukkit.entity.Player receiver) throws ReflectiveOperationException Make theEntitypassed as a parameter loose its custom glowing effect.This has no effect on glowing status given by another plugin or vanilla behavior.
- Parameters:
entity- entity to remove glowing effect fromreceiver- player which will no longer see the glowing effect- Throws:
ReflectiveOperationException
-
unsetGlowing
public void unsetGlowing(@NotNull @NotNull GlowingEntities.EntityIdentifier entity, @NotNull @NotNull org.bukkit.entity.Player receiver) throws ReflectiveOperationException Make an entity loose its previously existing glowing effect.This has no effect on glowing status given by another plugin or vanilla behavior.
- Parameters:
entity- identifier of the entity to remove glowing effect fromreceiver- player which will no longer see the glowing effect- Throws:
ReflectiveOperationException
-