Skript-Packet aims to be easiest as possible (even if packets are hard understand ...). So I have removed a lot of previous features. Don't worry, all of this features has been merge in ExprNMS or Auto-Converter. In conclusion you have less syntaxes and they are easy to use !
If you want to use this deprecated syntaxes you HAVE TO fork this project and enable them. I will not give support on them.
Please read the wiki
What is new :
- Support for Skript 2.6
- DataWatcher for metadata !
- default/sync/async mode for packet Listening !!! Becarful with async mode, you can't use non-thread-safe operation (e.g World Editing)
- Do section (It's experimental and can be deleted in future ... no doc for this, look the code if you are intersted)
Change :
- EVERYTHING !!! (A lot of Expressions has been removed)
- ExprNMS has been rework
- Auto-Converter has been rework (and is boosted with steroïds) WIKI
- SkriptPacketEventListener has a Manager ! Only support reload for now
- Update checker on plugin load
- ExprEnum show more informations on script load
Fix :
- Enum not working with protocolLib for 1.17
- Fields classes does not show null object
Note: Thanks you for using my addon bstats
Works with 1.17 if you use the right version of ProtocolLib.
FIX
- Fix NPE with "Packet Fields"
- Fix NPE with "Packet Fields Classes"
CHANGED
[packet] field %number% of %packet%
->[object] [packet] field %number% [of %-packet%]
[all] fields of [packet] %packet%
->[all] [packet] fields [of %-packet%]
[all] fields class[es] of [packet] %packet%
->[all] [packet] fields class[es] [of %-packet%]
ADDED
- Get net.md_5.bungee.api.chat.BaseComponent from a string
- Get the NMS (net.minecraft.server) TextComponent from a string
- Add expressions to get Chunk / Location / World / Entity / Player / ItemStack / Material from an NMS Object
- Convert an NMS (net.minecraft.server) ChatComponentText to a Json string
- Get NMS NBTTagCompound from a Json String
- Get an Enum from a class
- Get a java.util.UUID from a String UUID or create new one
- Get a readable text from a Json string (json Chat Format)
Use ProtocolLib 4.6.0+
FIX
- Better performance for huge packet like PacketPlayOutMapChunk
CHANGED
- Convert a number to int/float/long/double/short/byte [array] is now split in 2 expressions
- Packet can be send/received without calling skript event ! (nice to avoid infinite loop)
- Packet event support priority lowest/low/normal/high/highest/monitor
- More NMS getter
- Minor syntax change to match with ThatPacketAddon and help you to migration
👍
ADDED
- Receive Packet
- Packet update entity (easy way to reveal an hidden entity)
- Get an entity from his ID
- Get the NMS biome ID (not guaranted to be up to date)
- Get the deep clone of a packet
- Get the shallow clone of a packet
- Get, Set, Delete or Reset a packet Meta, you can store anything in extra datas of ProtocolLib's packetcontainer !
- Get the packettype of a packet
- Adding metrics
Tested with Paper-1.16.5, Skript-2.5.3, ProtocolLib-4.6.0, Java11, skript-reflect-2.1.0
Don't forgot to use a ProtocolLib dev build and not 4.5.1.
ADDED
- Packet event
- Get all available packettypes
- Create a new packettype
- Get and set a packet field (Auto conversion of number to int/float/long/double/short/byte)
- Get all fields of a packet
- Send a packet to players
- Get all fields's classes of a packet
- Create an ArrayList from objects
- Get the id of an entity
- Get the NMS of an entity/itemstack/world
- Create a NMS BlockPosition from a location or a vector
- Get the NMS Pair of an object with an other
- Convert a number to int/float/long/double/short/byte, can also convert to an Array
Known issue
- The packet event manager is not clear when you unregister a packet event
- If you use "on packet event play_client_use_entity:", player can't fully damage entities anymore
Tested with Paper-1.16.4, Skript-2.5.3, ProtocolLib-build-480, Java11, skript-reflect-2.1.0