Class GlowingBlocks

java.lang.Object
fr.skytasul.glowingentities.GlowingBlocks
All Implemented Interfaces:
org.bukkit.event.Listener

public class GlowingBlocks extends Object implements 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

    Constructors
    Constructor
    Description
    GlowingBlocks(@NotNull org.bukkit.plugin.Plugin plugin)
    Initializes the Glowing blocks API.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Disables the API.
    void
    Enables the Glowing blocks API.
    void
    onPlayerChunkLoad(io.papermc.paper.event.packet.PlayerChunkLoadEvent event)
     
    void
    setGlowing(@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.
    void
    setGlowing(@NotNull org.bukkit.block.Block block, @NotNull org.bukkit.entity.Player receiver, @NotNull org.bukkit.ChatColor color)
    Makes the Block passed as a parameter glow with the specified color.
    void
    unsetGlowing(@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.
    void
    unsetGlowing(@NotNull org.bukkit.block.Block block, @NotNull org.bukkit.entity.Player receiver)
    Makes the Block passed as a parameter loose its glowing effect.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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) and unsetGlowing(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 the Block passed as a parameter glow with the specified color.
      Parameters:
      block - block to make glow
      receiver - player which will see the block glowing
      color - 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 glow
      receiver - player which will see the block glowing
      color - 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 the Block passed as a parameter loose its glowing effect.
      Parameters:
      block - block to remove glowing effect from
      receiver - 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 from
      receiver - player which will no longer see the glowing effect
      Throws:
      ReflectiveOperationException
    • onPlayerChunkLoad

      public void onPlayerChunkLoad(io.papermc.paper.event.packet.PlayerChunkLoadEvent event)