ProtocolLib wrapper for CommandHelper
create_packet(protocol, side, name)
packet_read([packet], index)
packet_write([packet], index, value)
send_packet([player], packet)
packet_info([packet])
all_packets()
protocol, side, name, player, packet
bind(player_join, null, null, @e) {
@packet = create_packet('play', 'out', 'chat')
packet_write(@packet, 0, 'Hello')
packet_write(@packet, 2, 'GAME_INFO')
send_packet(@packet)
}
bind(packet_event, null, array(name: CHAT), @e) {
@info = packet_read(@e[packet], 2)
if (@info == 'GAME_INFO') {
packet_write(0, colorize('&cHello CHProtocol!'))
}
}