Package com.ranull.graves.integration
Class ProtocolLib
java.lang.Object
com.ranull.graves.integration.ProtocolLib
Provides integration with ProtocolLib to manage block changes and updates.
-
Constructor Summary
ConstructorsConstructorDescriptionProtocolLib
(Graves plugin) Constructs a new ProtocolLib instance with the specified Graves plugin. -
Method Summary
Modifier and TypeMethodDescriptionvoid
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.
-
Constructor Details
-
ProtocolLib
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
-