Disabling certain players' hitboxes

Discussion in 'Plugin Development' started by x8b, Jul 2, 2019.

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

    x8b

    I'm trying to make a minigame. When a player eventually dies, they'll go into spectator mode. How do I make it so that dead player can no longer be hit/pushed?

    EDIT: To clarify, by spectator mode I mean the player will be able to fly, but they will be invisible and unable to be hit.
    Another way is to disable the custom hotbar created when a player is in spectator mode. I don't know how to do either of these.
     
    Last edited: Jul 5, 2019
  2. Offline

    Dai_Kunai

    I don't think a player can be hit in spectator mode; or pushed.

    Maybe try using event.setCancelled(true) for a couple different events like entitydamagebyentity and playerdamageplayer stuff and events.
     
  3. Offline

    x8b

    Bump
     
Thread Status:
Not open for further replies.

Share This Page