How to suffocate a player

Discussion in 'Plugin Development' started by justin_393, Jun 7, 2015.

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

    justin_393

    Hey, so I'm wanting to suffocate a player, preferably like they're drowning. Anyone have any ideas on how to do this?
     
  2. Offline

    teej107

    @justin_393 What is this for exactly? Do you want to change the death message?
     
  3. Offline

    justin_393

    I'm making a space plugin, and if the player isn't wearing a space suit I want them to suffocate. Yes, I will end up changing the death message as well. An example of that would be nice as I've never changed death messages before
     
  4. Offline

    Gotten

    If you're looking to have them suffocate when they're not wearing their 'space helmet' you could try using a scheduler..
    deal a heart of damage every few seconds if they have no helmet equipped?

    It isn't the actual suffocating from water but it can look a lot like it if you time it right
     
    Last edited: Jun 7, 2015
  5. Offline

    teej107

    NathanWolf likes this.
  6. Offline

    justin_393

    Yeah, I thought about that, but I really want the drowning affect :/

    Thanks! I'll try that and let you know. Anyone know the default max? Is it 20?
     
  7. Offline

    NathanWolf

    I like @teej107's suggestion, if that doesn't work out though for some reason, you can damage a player directly with DamageSource.STUCK, but that will involve reaching into NMS so best to avoid that.
     
Thread Status:
Not open for further replies.

Share This Page