Class GlowingBlocks
java.lang.Object
fr.skytasul.glowingentities.GlowingBlocks
- All Implemented Interfaces:
org.bukkit.event.Listener
An extension of
GlowingEntities to make blocks glow as well!
Can only be used on Paper-based servers.
- Author:
- SkytAsul
-
Constructor Summary
ConstructorsConstructorDescriptionGlowingBlocks(@NotNull org.bukkit.plugin.Plugin plugin) Initializes the Glowing blocks API. -
Method Summary
Modifier and TypeMethodDescriptionvoiddisable()Disables the API.voidenable()Enables the Glowing blocks API.voidonPlayerChunkLoad(io.papermc.paper.event.packet.PlayerChunkLoadEvent event) voidsetGlowing(@NotNull org.bukkit.Location block, @NotNull org.bukkit.entity.Player receiver, @NotNull org.bukkit.ChatColor color) Makes the block at the location passed as a parameter glow with the specified color.voidsetGlowing(@NotNull org.bukkit.block.Block block, @NotNull org.bukkit.entity.Player receiver, @NotNull org.bukkit.ChatColor color) Makes theBlockpassed as a parameter glow with the specified color.voidunsetGlowing(@NotNull org.bukkit.Location block, @NotNull org.bukkit.entity.Player receiver) Makes the block at the location passed as a parameter loose its glowing effect.voidunsetGlowing(@NotNull org.bukkit.block.Block block, @NotNull org.bukkit.entity.Player receiver) Makes theBlockpassed as a parameter loose its glowing effect.
-
Constructor Details
-
GlowingBlocks
public GlowingBlocks(@NotNull @NotNull org.bukkit.plugin.Plugin plugin) Initializes the Glowing blocks API.- Parameters:
plugin- plugin that will be used to register the events.
-
-
Method Details
-
enable
public void enable()Enables the Glowing blocks API.- See Also:
-
disable
public void disable()Disables the API.Methods such as
setGlowing(Location, Player, ChatColor)andunsetGlowing(Location, Player)will no longer be usable.- See Also:
-
setGlowing
public void setGlowing(@NotNull @NotNull org.bukkit.block.Block block, @NotNull @NotNull org.bukkit.entity.Player receiver, @NotNull @NotNull org.bukkit.ChatColor color) throws ReflectiveOperationException Makes theBlockpassed as a parameter glow with the specified color.- Parameters:
block- block to make glowreceiver- player which will see the block glowingcolor- color of the glowing effect- Throws:
ReflectiveOperationException
-
setGlowing
public void setGlowing(@NotNull @NotNull org.bukkit.Location block, @NotNull @NotNull org.bukkit.entity.Player receiver, @NotNull @NotNull org.bukkit.ChatColor color) throws ReflectiveOperationException Makes the block at the location passed as a parameter glow with the specified color.- Parameters:
block- location of the block to make glowreceiver- player which will see the block glowingcolor- color of the glowing effect- Throws:
ReflectiveOperationException
-
unsetGlowing
public void unsetGlowing(@NotNull @NotNull org.bukkit.block.Block block, @NotNull @NotNull org.bukkit.entity.Player receiver) throws ReflectiveOperationException Makes theBlockpassed as a parameter loose its glowing effect.- Parameters:
block- block to remove glowing effect fromreceiver- player which will no longer see the glowing effect- Throws:
ReflectiveOperationException
-
unsetGlowing
public void unsetGlowing(@NotNull @NotNull org.bukkit.Location block, @NotNull @NotNull org.bukkit.entity.Player receiver) throws ReflectiveOperationException Makes the block at the location passed as a parameter loose its glowing effect.- Parameters:
block- location of the block to remove glowing effect fromreceiver- player which will no longer see the glowing effect- Throws:
ReflectiveOperationException
-
onPlayerChunkLoad
public void onPlayerChunkLoad(io.papermc.paper.event.packet.PlayerChunkLoadEvent event)
-