• Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

Supported Minecraft Versions
  1. 1.8
  2. 1.9
  3. 1.10
  4. 1.11
  5. 1.12
  6. 1.13
  7. 1.14
  8. 1.15
  9. 1.16
  10. 1.17
  11. 1.18
  12. 1.19
Dependencies: skript-reflect

Firstly, it is a remake of PacketListenerNMSK by TPGamesNL which works on versions 1.8 to 1.19.4.

What does this script include:
- In, out packet listener
- Auto splitter for BundlePacket (in 1.19.4+)
- auto-detection available packets
- auto-detection of packet constructors
- auto-detection of packet decoders
- stuff to create packets and decrypt them
- method to send packets to players

API syntax:

event: packet event
fired when packet received or sended

on packet [%packet name%]:
  #what packet sended\received
  #can be setted to new packet for overwrite

  #who sended\to whom it was sent

effect: send packet
sends packets to specified players
send packet %packets% to %players%

function: create empty buffer
returns an empty buffer to create the packet

functions: write data to the buffer
write specific type to buffer

writeBytes(%buffer to%, %buffer from%)
writeBoolean(%boolean%, %buffer%)
writeByte(%number%, %buffer%)
writeShort(%number%, %buffer%)
writeFloat(%number%, %buffer%)
writeDouble(%number%, %buffer%)
writeInt(%number%, %buffer%)
writeLong(%number%, %buffer%)
writePosition(%x number%,%y number%,%z number%,%buffer%)
writeVarInt(%number%, %buffer%)
writeVarLong(%number%, %buffer%)
writeString(%text%, %buffer%)
writeUUID(%uuid object or string%, %buffer%)
writeAngle(%number%, %buffer%)

functions: read data from the buffer
read specified type from buffer and return it

readBoolean(%buffer%) :: boolean
readByte(%buffer%) :: number
readShort(%buffer%) :: number
readFloat(%buffer%) :: number
readDouble(%buffer%) :: number
readInt(%buffer%) :: number
readLong(%buffer%) :: number
readPosition(%buffer%) :: numbers list of 3
readVarInt(%buffer%) :: number
readVarLong(%buffer%) :: number
readString(%buffer%) :: text
readUUID(%buffer%) :: uuid_object
readAngle(%buffer%) :: number

function: create packet
creates and returns packet by simplied class name with data from the buffer, buffer data defined at WIKI.VG
createPacket(%packet name%,%buffer%) :: %packet%

function: get packet name by protocol
returns packet simplied name by its STATE, BOUND and ID, defined at WIKI.VG
getWrappedPacketNameByProtocol(%number id%,%text state%,%text bound%) :: text:

function: decode packet
returns buffer of received or sended packet (created packet)
decodePacket(%packet%) :: buffer:

expression: player's skin signature and value
returns string what contains signature or value. Can be used in player spawn packet or creating custom heads

%player%'s skin (signature|value)
skin (signature|value) of %player%

Also its include some ready to use packets what has less differences on different versions, such as:
- PacketPlayOutEntityDestroy
- PacketPlayOutCamera
- PacketPlayOutEntityTeleport
- PacketPlayOutOpenSignEditor
- PacketPlayOutPosition
- PacketPlayOutUpdateHealth
- PacketPlayOutBlockBreakAnimation
- PacketPlayOutAnimation
- PacketPlayOutEntityHeadRotation
- PacketPlayOutEntityLook

The list will be updated in future updates.

How to create packet if not included?
Go to this site and select your core version
2. Find the required packet, find its id (in decimal), state and bound.
3. Get wrapped packet name with function getWrappedPacketNameByProtocol(...)
4. Create EmptyBuffer and fill it with data
5. Create packet with function CreatePacket(...)

Example, I need this packet:


I converted id to decimal, I know which State and Bound. Now I can get the packet name with function - it's PacketPlayOutCamera.

function PacketPlayOutCamera(id: number) :: object:
    set {_buffer} to EmptyBuffer()
    return createPacket("PacketPlayOutCamera",{_buffer})

I populated a buffer based on information from the site, created a packet, and wrapped it all in a function to call it in the future. Now putting the number of the entity into the function - I can create a packet and send it to any player.

First release
Last update
5.00 star(s) 3 ratings

More resources from lotzy

Latest updates

  1. trrr brrrr boring

    - Auto apply DataWatcher on 1.8.8 version. Its allow you to create living entity spawn packets...
  2. BundlePacket splitter and some stuff

    Added auto splitting and packing 1.19.4 BundlePackets. This is a packet that contains several...

Latest reviews

good job, works as a Skript replacement for ProtocolLib :)
Very surprised by your feedback, I really like your addon 'Hippo'. Surprisingly, I never looked at the ProtocolLib sources, but at some point I caught a stupor as ViaVersion converts packets :D, it turned out to be in vain. This work still has a lot of flaws, for example, package constructors could be stored not as a skript-reflect class, but as a real constructor, this should be faster than the current implementation. In any case, thanks for the feedback!
well done mate ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
thanks, but its has some troubles, like new BoundlePacket
eren approved ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀