Change the view height of a player

Discussion in 'Spigot Plugin Development' started by Soolz, Jul 9, 2018.

  1. Everything is in the title ;)
  2. md_5

    Administrator Developer

    You can't, its up to the client
    • Friendly Friendly x 1
  3. You 'could' make the player invisible, create a fake player for the rest of a server. and make an invisible armorstand that the player rides with a different y value.
    • Useful Useful x 1
  4. How can I do this?
  5. To make the player invisible, use the hidePlayer method. Creating a fake player will require NMS - go look it up on google. An invisible armourstand is easy, just create an armourstand entity, use #setVisible(false) then add the player as a passenger.
    • Useful Useful x 1
  6. Afaik there is a fakeplayer class maintained somewhere.

    If i remember right you can set the player as a viewer too, maybe use that?
    • Like Like x 1