Class WrapperPlayServerBlockAction
java.lang.Object
com.comphenix.packetwrapper.wrappers.AbstractPacket
com.comphenix.packetwrapper.wrappers.play.clientbound.WrapperPlayServerBlockAction
This packet is used for a number of actions and animations performed by blocks, usually non-persistent. The client ignores the provided block type and instead uses the block state in their world.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.comphenix.protocol.PacketTypeThe packet type that is wrapped by this wrapper.Fields inherited from class com.comphenix.packetwrapper.wrappers.AbstractPacket
handle -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new wrapper and initialize it with a packet handle with default valuesWrapperPlayServerBlockAction(com.comphenix.protocol.events.PacketContainer packet) Constructors a new wrapper for the specified packet -
Method Summary
Modifier and TypeMethodDescriptionintgetB0()Retrieves the action to performintgetB1()Retrieves the parameter for the action retrieved by @link{getB0(int)}org.bukkit.MaterialgetBlock()Retrieves the type of the block.com.comphenix.protocol.wrappers.BlockPositiongetPos()Retrieves the position of the block.voidsetB0(int value) Sets the action to performvoidsetB1(int value) Sets the parameter for the action specified by @link{setB0(int)}voidsetBlock(org.bukkit.Material value) Sets the type of the block.voidsetPos(com.comphenix.protocol.wrappers.BlockPosition value) Sets the position of the block.Methods inherited from class com.comphenix.packetwrapper.wrappers.AbstractPacket
broadcastPacket, equals, getHandle, hashCode, receivePacket, sendPacket
-
Field Details
-
TYPE
public static final com.comphenix.protocol.PacketType TYPEThe packet type that is wrapped by this wrapper.
-
-
Constructor Details
-
WrapperPlayServerBlockAction
public WrapperPlayServerBlockAction()Constructs a new wrapper and initialize it with a packet handle with default values -
WrapperPlayServerBlockAction
public WrapperPlayServerBlockAction(com.comphenix.protocol.events.PacketContainer packet) Constructors a new wrapper for the specified packet- Parameters:
packet- the packet to wrap
-
-
Method Details
-
getPos
public com.comphenix.protocol.wrappers.BlockPosition getPos()Retrieves the position of the block.- Returns:
- 'pos'
-
setPos
public void setPos(com.comphenix.protocol.wrappers.BlockPosition value) Sets the position of the block.- Parameters:
value- New value for field 'pos'
-
getB0
public int getB0()Retrieves the action to perform- Returns:
- 'b0' action index to perform
-
setB0
public void setB0(int value) Sets the action to perform- Parameters:
value- Sets the index of the action to perform
-
getB1
public int getB1()Retrieves the parameter for the action retrieved by @link{getB0(int)}- Returns:
- 'b1'
-
setB1
public void setB1(int value) Sets the parameter for the action specified by @link{setB0(int)}- Parameters:
value- New value for field 'b1'
-
getBlock
public org.bukkit.Material getBlock()Retrieves the type of the block.- Returns:
- 'block'
-
setBlock
public void setBlock(org.bukkit.Material value) Sets the type of the block.- Parameters:
value- New value for field 'block'
-