Solved Client Side , skript-mirror , viaversion , tuske error

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

    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.

ZeyKra_

Active Member
Dec 12, 2019
109
2
18
a baguette
Sorry for this title. So I made A long thread wich ask help for making a client side pumpkin finally TPGamesNL
find the problem but there is another one problem, If I the command /packettest (the command of the code) in 1.8 the pumpkin will be set on my head like it should be :emoji_slight_smile: , But if player is using version +1.9 and more the pumpkin get set on player chestplate so I saw that in 1.8 head slot is 3 and in 1.9(+) the head slot is 4

the code that I used
Code:
import:
    java.lang.System
    java.lang.String as JavaString
    java.lang.Math
    org.bukkit.Location
    java.lang.Short
    com.comphenix.protocol.events.PacketContainer

command /packettest:
    trigger: 
        set {_packet} to new play_server_entity_equipment packet
        set int pnum 0 of {_packet} to player.getHandle().getId()
        set itemstack field 0 of {_packet} to pumpkin
        set {_packet}.getHandle().b to 3
        wait a tick
        send player packet {_packet}
/CODE]

fo 1.9 version just change this line [CODE] set {_packet}.getHandle().b to 4

So I tried so seperate the moment when The slot get set by checking player's version I used tuske expressions "minecraft version of player" but on every client version it returned me 1.8 so I updated my viaversion to the last version. Now I can get players version well

Code:
import:
    java.lang.System
    java.lang.String as JavaString
    java.lang.Math
    org.bukkit.Location
    java.lang.Short
    com.comphenix.protocol.events.PacketContainer
 
command /packettest:
    trigger: 
        set {_packet} to new play_server_entity_equipment packet
        set int pnum 0 of {_packet} to player.getHandle().getId()
        set itemstack field 0 of {_packet} to pumpkin
        if minecraft version of player is "1.8":
            set {_packet}.getHandle().b to 3
        if minecraft version of player is "1.9" or "1.10" or "1.11" or "1.12" or "1.13" or "1.14" or "1.15":
            set {_packet}.getHandle().b to 4
        wait a tick
        send player packet {_packet}

but for 1.8 players everything work great but 1.9(+) player get kick and got this error

upload_2020-3-6_0-45-45.png


So do someone knows how to fix this ??
(btw I can rexplain something bc my english is bad sorry )

Also sorry if my post isn't in the good section :/
[doublepost=1583503200,1583452362][/doublepost]Sorry my issue is fixed
 
Status
Not open for further replies.