#teleportation packet error
1 messages · Page 1 of 1 (latest)
com.comphenix.protocol.reflect.FieldAccessException: No field with type double exists in class PacketPlayOutRelEntityMoveLook.
Here's my code:
public class Teleport implements CommandExecutor {
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (sender instanceof Player) {
ProtocolManager manager = ProtocolLibrary.getProtocolManager();
Player p = (Player) sender;
PacketContainer packet = manager.createPacket(PacketType.Play.Server.REL_ENTITY_MOVE_LOOK);
packet.getDoubles().write(0, p.getLocation().getX()+1);
packet.getDoubles().write(1, p.getLocation().getY());
packet.getDoubles().write(2, p.getLocation().getZ());
try {
manager.sendServerPacket(p, packet);
} catch (InvocationTargetException e) {
e.printStackTrace();
}
}
return true;
}
}```
It’s probably wrapped into something by protocollib
I don't understand what ProtocolLib wrapping is, could you explain what it is and what I should be doing differently?
Wrapping several objects into another object
Probably a location or something
Nope checked packet wrapper
They are shorts
ProtocolLib only wraps nms packets