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
, 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
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
but for 1.8 players everything work great but 1.9(+) player get kick and got this error
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
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
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
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