Solved Troubles with ThatPacketAddon

  • 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!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

EagL

Member
Jun 23, 2020
2
0
0
23
Skript Version (do not put latest): Skript v2.5-alpha3
Skript Author: Bensku
Minecraft Version: 1.15.2
---
Full Code:
Code:
set {_cooldownPacket} to new play_client_set_cooldown packet

I have thatpacketaddon v1.0-BETA.3 and ProtocolLib v4.5.1. I've read the docs and from what I could understand the code above should work, but it doesn't:
[16:40:22 ERROR]: Can't understand this expression: 'new play_client_set_cooldown packet' (testscript.sk, line 76: set {_cooldownPacket} to new play_client_set_cooldown packet')

I've tried the same thing with other packets but they result in the same error.
[doublepost=1593709950,1593700931][/doublepost]I got it working now with play_server_set_cooldown instead, but why is that? Shouldnt it be client according to https://wiki.vg/Protocol#Set_Cooldown? Ok, so apparently youre supposed to use the opposite of what that page says. If its bound to the client it should be sent by the server.
 
Status
Not open for further replies.