Solved Armor effeects without armor?

Discussion in 'Plugin Development' started by Link_Awesomesause, Apr 27, 2016.

Thread Status:
Not open for further replies.
  1. Is it possible to give a player armor enchants such as depth strider, when they are not wearing any armor. If so how.
     
  2. Offline

    Zombie_Striker

    @Link_Awesomesause
    You cannot. Enchantments are applied to itemstacks, which you cannot have if you do not want them to wear any armour.
     
  3. Ok then, is it possible to give the player an enchanted "Air" itemsack?
     
  4. Offline

    mine-care

    @Link_Awesomesause Nope, air is... Air :p you can not enchant it or give lores and stuff.
     
  5. @mine-care aww... I thought that would work.. anyway, got a work around for this?
     
  6. Offline

    mine-care

    @Link_Awesomesause Well depends on what you want to do :/
    So if for instance you want feather falling, listen to damage event and if the damage cause is fall, set the damage to damage - somethig or damage / something :p
     
  7. Offline

    Zombie_Striker

    @Link_Awesomesause
    If I remember correctly, depth strider just allows the player to swim faster. You can increase the player's walk speed while they are in the water and decrease the walk speed when they are not (do this by listening to the PlayerMoveEvent, and check if the block's type at the player's feet is equal to water)
     
  8. @Zombie_Striker The PlayerMoveEvent, is what even I thought but it is a lot, and might cause sme heavy lag if the server is not good. But I will do it, and check if I can mimic depth strider
     
  9. Offline

    Zombie_Striker

    @Link_Awesomesause
    If you wish, you can create a scheduler that runs every couple of seconds. This may be a better choice if you're concerned about memory usage/lag. If you want, set it to check every half a second if you do not want any delay between the changes in the walk speed.
     
  10. Well, since thats all I can do, I guess this is solved
     
Thread Status:
Not open for further replies.

Share This Page