Class ProtocolLib

java.lang.Object
com.ranull.graves.integration.ProtocolLib

public final class ProtocolLib extends Object
Provides integration with ProtocolLib to manage block changes and updates.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a new ProtocolLib instance with the specified Graves plugin.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    refreshBlock(org.bukkit.block.Block block, org.bukkit.entity.Player player)
    Refreshes the block at a specific location to reflect its current state.
    void
    setBlock(org.bukkit.block.Block block, org.bukkit.Material material, org.bukkit.entity.Player player)
    Sets the block at a specific location to a new material and updates the client.

    Methods inherited from class java.lang.Object

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

    • ProtocolLib

      public ProtocolLib(Graves plugin)
      Constructs a new ProtocolLib instance with the specified Graves plugin.
      Parameters:
      plugin - The main Graves plugin instance.
  • Method Details

    • setBlock

      public void setBlock(org.bukkit.block.Block block, org.bukkit.Material material, org.bukkit.entity.Player player) throws InvocationTargetException
      Sets the block at a specific location to a new material and updates the client.
      Parameters:
      block - The block to change.
      material - The material to set the block to.
      player - The player to whom the update will be sent.
      Throws:
      InvocationTargetException
    • refreshBlock

      public void refreshBlock(org.bukkit.block.Block block, org.bukkit.entity.Player player) throws InvocationTargetException
      Refreshes the block at a specific location to reflect its current state.
      Parameters:
      block - The block to refresh.
      player - The player to whom the update will be sent.
      Throws:
      InvocationTargetException