How to remove sound from armorstand

Discussion in 'Spigot Plugin Development' started by Feeps, Apr 22, 2017.

  1. Hello,
    First of all I want to say that my English is not great :/
    When I change armorstand armor, there is a very annoying sound. Is it possible to delete it ?
    Thanks in advance :)
     
  2. There's probably a way to intercept the sound packet with NMS.
     
  3. Yes it is possible by creating a custom armorstand class that you have to use then.
    The Method that you have to override is this:

    Code (Text):

      @Override
        protected void a_(@javax.annotation.Nullable net.minecraft.server.v1_9_R2.ItemStack itemstack) {
            //Remove sounds
        }
     
    That's the method for 1.9 haven't checked the method for 1.10 / 1.11 ( might have changed but you can simply search for the itemstack tho )
     
  4. Ok, thank you
    I'll try this code now, I'll let you know when I'm done
     
  5. After several tests ... I do not have good results :/
    I can not do it
     
  6. Mas

    Mas

    Show us what you tried or we can't help.
     
  7. @ItsMas_ already mentioned something..
     
  8. @Override
    protected void a_(@javax.annotation.Nullable net.minecraft.server.v1_9_R2.ItemStack itemstack) {
    //I have to put what ? I can't find the field
    }
     
  9. No i ment by that, have you created a custom entity class by extending the entityarmorstand? And post that class then