Hide items dropped (Protocollib)

Discussion in 'Plugin Development' started by Irantwomiles, May 13, 2017.

Thread Status:
Not open for further replies.
  1. Offline

    Irantwomiles

    Anyone know if it's possible to hide an item dropped by a player for certain people? or what packet it is.
     
  2. Offline

    Mahtaran

    PacketPlayOutEntityDestroy
    Code:
    Skeleton skeleton = (Skeleton) p.getWorld().spawnEntity(p.getLocation(), EntityType.SKELETON);
    for(Player on : Bukkit.getServer().getOnlinePlayers()) {
      PacketPlayOutEntityDestroy packet = new PacketPlayOutEntityDestroy(skeleton.getEntityId());
      ((CraftPlayer) on).getHandle().playerConnection.sendPacket(packet);
    }
    Just some example code
     
  3. Offline

    Irantwomiles

    Is it possible to destroy a particle effect?
     
  4. Offline

    Mahtaran

    For that you will have to cancel PacketPlayOutWorldParticles, or (preferably) take a look at this resource from Comphenix (author of ProtocolLib).
     
  5. Offline

    Irantwomiles

    Yea I should probably mark this solved as the EntityHider class hides pretty much every entity you can think of, but it doesn't remove the particles of splash potions or sounds of projectiles which is what I need.
     
Thread Status:
Not open for further replies.

Share This Page