Disabling The Respawn Screen

Discussion in 'Plugin Development' started by RoBaMe, Jul 23, 2015.

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

    RoBaMe

    Hi! I'm creating a spectator Plugin, when a player dies, its changing them to gamemode 3 and says a message. i use entity damage by entity because you can't cancel the death event, but you can cancel the damage event, the problem is that the players don't drop their items, so i can't use entity damage. so what do i do? because i'm really confused XD I had the idea of disabling the respawn screen but i don't think its possible, so is there a way to disable the respawn screen and still have the item drops? please help me! Thx
     
  2. Offline

    DoggyCode™

    Umm.. if you want a thing like they cannot respawn, I'd rather just ban them for a certain amount of time.. Idk
     
  3. Offline

    schwabfl

    listen to entitydeath
    if the entity is a player
    set their health to 20

    you don't need to cancel any event
     
  4. Offline

    DoggyCode™

    @schwabfl 's method actually works :p And after putting their health to 20, put them in gamemode 3 (your wish) and put them in this "spectating" mode.

    @RoBaMe
     
  5. Offline

    SantaClawz69

    If you don't understand what @schwabfl said here's the code.

    Code:
    @EventHandler
        public void onPlayerDeath(PlayerDeathEvent e)
        {
            Player player = e.getEntity();
            if(e.getEntity() instanceof Player)
            {
                player.setHealth(20);
            }
        }
     
Thread Status:
Not open for further replies.

Share This Page