1.14.4 How to use the ProtocolLib spawn armorStand

Discussion in 'Spigot Plugin Development' started by inrh, Mar 29, 2020.

  1. It does not show the armor stand, but it does show bubbles.


    This my code
    Code (Java):

    // https://wiki.vg/Protocol
    public static void sendTPPacket(Player player) {
        PacketContainer packet = new PacketContainer(PacketType.Play.Server.SPAWN_ENTITY);

        Location loc = player.getLocation();

        Integer entityID = (int)(Math.random() * Integer.MAX_VALUE);

        // Entity ID
        packet.getIntegers().write(0, entityID);
        // Entity Type
        packet.getIntegers().write(6, 78);

        packet.getIntegers().write(1, 0);
        packet.getIntegers().write(2, 0);
        packet.getIntegers().write(3, 0);

        packet.getIntegers().write(4, 0);
        packet.getIntegers().write(5, 0);

        packet.getDoubles().write(0, loc.getX());
        packet.getDoubles().write(1, loc.getY());
        packet.getDoubles().write(2, loc.getZ());

        packet.getUUIDs().write(0, UUID.randomUUID());
        try {
            ProLib.pm.sendServerPacket(player, packet);
        } catch (Exception e) {
    I tried WrapperPlayServerSpawnEntity, but it doesn't have setX setY setZ method.
    I tried searching and couldn't find a working method.
    I can't even access this site https://wiki.vg/Protocol, so I can't do any work.
  2. I found that 1.12.2 did not have this problem, but 1.14.4 did.