Disabling armor resistance

Discussion in 'Plugin Development' started by Ziden, Dec 21, 2014.

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

    Ziden

    Hi

    My question is fair simple, and i couldnt make it work.

    Is it possible to disable all armor protections ? Diamond = naked etc.

    Thanks for the attention !
     
  2. Offline

    Skionz

    @Ziden Use the EntityDamageEvent. I believe all the algorithms for enchantments are on the wiki.
     
    Konato_K likes this.
  3. Offline

    mine-care

    @Ziden hmm not sure, if it is server side ( dont think it is) then yes you can use reflection to override it but if it is client side then no.
    The only possible solution i can think of is taking over damaging. like, find what damage does wood sword do to no armor player, and then on entitydamagebyentity cancel the event and damage the player manually like if it is wood sword damage him by 2.0 I think this way no matter the armor it will do the same damage
     
  4. Offline

    Ziden

    im using it , but how can i change the damage for the real damage w/o armor calculations ?

    Ive tought on calling p.damage(ev.getDamage(), ev.getDamagee(), ev.getCause()) however it wont work properly.
     
  5. Offline

    Skionz

    @Ziden Use the opposite algorithm.
     
  6. Offline

    Ziden

    how ?
     
Thread Status:
Not open for further replies.

Share This Page