-
Notifications
You must be signed in to change notification settings - Fork 0
PacketsUtils
Fulminazzo edited this page Oct 2, 2023
·
1 revision
PacketsUtils is a group of functions to send packets to the player using NMS. Many of these should not worry you, and you should only focus on the sendPacket function. However, they might be helpful, so we will explain every one of them:
-
getEntityPlayer(Object player): returns a ReflObject containing the equivalent of((CraftPlayer) player).getHandle(); -
getPlayerConnection(Object player): returns a ReflObject containing the field of((EntityPlayer) player)of type PlayerConnection; -
getWorldConnection(World world): returns a ReflObject containing the equivalent of((CraftWorld) world).getHandle(); -
sendPacket(Object player, ReflObject<?> packet): sends a packet encapsulated in a ReflObject using thegetPlayerConnection()method.
- Home
- How to start a plugin
- Work with Configuration Files
- Work with Enums
- Work with Commands
- Work with Custom Players
- Work with Messaging Channels
- Creating custom SavableObjects
- Timers
- General Utils
- Placeholders
- Bukkit Utils
- Velocity Utils