Class DisabledPacketManager

java.lang.Object
ua.mcchickenstudio.opencreative.managers.packets.DisabledPacketManager
All Implemented Interfaces:
Manager, PacketManager

public final class DisabledPacketManager extends Object implements PacketManager
This class represents a disabled packet manager is used, when other plugins implementation is not detected. It will not do anything on methods usage.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    displayAsSpectatorName(@NotNull org.bukkit.entity.Player player, @NotNull org.bukkit.entity.Player receiver)
    Player's name in players list will be seen by receiver with usual spectator's transparent gray color.
    void
    displayGlowingBlock(@NotNull org.bukkit.entity.Player player, @NotNull org.bukkit.Location location)
    Spawns a visual glowing block only for player in specified location.
    Returns name of manager, that will be displayed by request in the logs.
    void
    Initialization of manager.
    boolean
    Checks if manager is ready to work.
    void
    removeSpectatorName(@NotNull org.bukkit.entity.Player player, @NotNull org.bukkit.entity.Player receiver)
    Player's name in players list will be seen by receiver as default player's name.
    void
    sendChestCloseAnimation(@NotNull org.bukkit.entity.Player player, @NotNull org.bukkit.block.Block block)
    Plays a chest closing animation for player.
    void
    sendChestOpenAnimation(@NotNull org.bukkit.entity.Player player, @NotNull org.bukkit.block.Block block)
    Plays a chest opening animation for player.
    void
    showBlockForPlayer(@NotNull org.bukkit.entity.Player player, @NotNull org.bukkit.Location location, @NotNull org.bukkit.Material material)
    Shows fake phantom block for player.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DisabledPacketManager

      public DisabledPacketManager()
  • Method Details

    • displayGlowingBlock

      public void displayGlowingBlock(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull org.bukkit.Location location)
      Description copied from interface: PacketManager
      Spawns a visual glowing block only for player in specified location. Glowing block needs to be invisible and not physical. As block entity can be used Shulker, BlockDisplay, FallingBlock.
      Specified by:
      displayGlowingBlock in interface PacketManager
      Parameters:
      player - player, that will see glowing block.
      location - location, where block will be seen.
    • sendChestOpenAnimation

      public void sendChestOpenAnimation(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull org.bukkit.block.Block block)
      Description copied from interface: PacketManager
      Plays a chest opening animation for player.

      If specified block is not chest, then animation will be not played and will be ignored.

      Specified by:
      sendChestOpenAnimation in interface PacketManager
      Parameters:
      player - player, that can see this animation.
      block - block where animation can be played.
    • sendChestCloseAnimation

      public void sendChestCloseAnimation(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull org.bukkit.block.Block block)
      Description copied from interface: PacketManager
      Plays a chest closing animation for player.

      If specified block is not chest, then animation will be not played and will be ignored.

      Specified by:
      sendChestCloseAnimation in interface PacketManager
      Parameters:
      player - player, that can see this animation.
      block - block where animation can be played.
    • displayAsSpectatorName

      public void displayAsSpectatorName(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull org.bukkit.entity.Player receiver)
      Description copied from interface: PacketManager
      Player's name in players list will be seen by receiver with usual spectator's transparent gray color. Used to separate players in same world and players in different worlds.
      Specified by:
      displayAsSpectatorName in interface PacketManager
      Parameters:
      player - player to change display name.
      receiver - player that will see this change.
    • removeSpectatorName

      public void removeSpectatorName(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull org.bukkit.entity.Player receiver)
      Description copied from interface: PacketManager
      Player's name in players list will be seen by receiver as default player's name.
      Specified by:
      removeSpectatorName in interface PacketManager
      Parameters:
      player - player to change display name.
      receiver - player that will see this change.
    • showBlockForPlayer

      public void showBlockForPlayer(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull org.bukkit.Material material)
      Description copied from interface: PacketManager
      Shows fake phantom block for player.
      Specified by:
      showBlockForPlayer in interface PacketManager
      Parameters:
      player - player to change display name.
      location - player that will see this change.
      material - type of block.
    • init

      public void init()
      Description copied from interface: Manager
      Initialization of manager.
      Specified by:
      init in interface Manager
    • isEnabled

      public boolean isEnabled()
      Description copied from interface: Manager
      Checks if manager is ready to work.
      Specified by:
      isEnabled in interface Manager
      Returns:
      true - if enabled, false - disabled.
    • getName

      public String getName()
      Description copied from interface: Manager
      Returns name of manager, that will be displayed by request in the logs.
      Specified by:
      getName in interface Manager
      Returns:
      name of manager.