Interface PacketContext
public interface PacketContext
Where a received payload came from.
-
Method Summary
Modifier and TypeMethodDescriptionThe side that received the payload.net.minecraft.world.entity.player.PlayerThe player it's about: the sender on the server, the local player on the client.voidRuns a task on the receiving side's main thread.
-
Method Details
-
getPlayer
net.minecraft.world.entity.player.Player getPlayer()The player it's about: the sender on the server, the local player on the client. -
queue
Runs a task on the receiving side's main thread. -
getEnvironment
Env getEnvironment()The side that received the payload.
-