Class MinecraftConnection
java.lang.Object
com.cryptomorin.xseries.reflection.minecraft.MinecraftConnection
Provides general packet-related API for players.
Clientbound Packets are considered fake updates to the client without changing the actual data. Since all the data is handled by the server.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final MinecraftClassHandlestatic final MinecraftClassHandlestatic final MinecraftClassHandlestatic final MinecraftClassHandlestatic final MinecraftClassHandle -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectgetConnection(org.bukkit.entity.Player player) static ObjectgetHandle(org.bukkit.entity.Player player) static voidsendPacket(org.bukkit.entity.Player player, Object... packets) Sends a packet to the player asynchronously if they're online.
-
Field Details
-
ServerPlayer
-
CraftPlayer
-
ServerPlayerConnection
-
ServerGamePacketListenerImpl
-
Packet
-
-
Constructor Details
-
MinecraftConnection
public MinecraftConnection()
-
-
Method Details
-
getHandle
-
getConnection
-
sendPacket
@Nonnull public static void sendPacket(@Nonnull org.bukkit.entity.Player player, @Nonnull Object... packets) Sends a packet to the player asynchronously if they're online. Packets are thread-safe.- Parameters:
player- the player to send the packet to.packets- the packets to send.- Since:
- 1.0.0
-