Hi guys, First sry for my bad english ! Now to my main problem... I recently code this little method: Code (Text): public static void spawnHologram(Location loc, String text, List<Player> players) { EntityArmorStand as = new EntityArmorStand(((CraftWorld) loc.getWorld() ).getHandle()); as.setCustomName(text); as.setCustomNameVisible(true); as.setInvisible(true); as.setGravity(false); as.setLocation(loc.getX(), loc.getY(), loc.getZ(), 0F, 0F); PacketPlayOutSpawnEntityLiving packet = new PacketPlayOutSpawnEntityLiving(as); for(Player p : players) { ((CraftPlayer) p).getHandle().playerConnection.sendPacket(packet); main.Holograms.put(p, as); } } but now i have to update the Hologram but don't know how to do that! It would be nice if someone could help me xD Edit: The method works fine but i want to change the displayed text after some time
Maybe send a destroy packet and then spawn it again... I don't think there's a PacketPlayOutUpdateEntityLiving or? P.S. I'm not really good at NMS
Thank you!! It works! For all who are interested in the code: 1st Part: Code (Text): public static PacketPlayOutEntityDestroy destroyEntity(Entity entity) { return new PacketPlayOutEntityDestroy(entity.getId()); } 2nd Part: Code (Text): public static void spawnHologram(Location loc, String text, List<Player> players) { EntityArmorStand as = new EntityArmorStand(((CraftWorld) loc.getWorld() ).getHandle()); as.setCustomName(text); as.setCustomNameVisible(true); as.setInvisible(true); as.setGravity(false); as.setLocation(loc.getX(), loc.getY(), loc.getZ(), 0F, 0F); PacketPlayOutSpawnEntityLiving packet = new PacketPlayOutSpawnEntityLiving(as); for(Player p : players) { if(main.Holograms.containsKey(p)){ PacketPlayOutEntityDestroy packet2 = destroyEntity(main.Holograms.get(p)); ((CraftPlayer) p).getHandle().playerConnection.sendPacket(packet2); } ((CraftPlayer) p).getHandle().playerConnection.sendPacket(packet); main.Holograms.put(p, as); } } So its SOLVED!