Skip "Respawn" "Title Screen" dialog on death

Discussion in 'Plugin Development' started by potatofarms, Aug 10, 2012.

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

    Luc14Dev

    Code:
    @EventHandler
        public void RespawnScreen(PlayerDeathEvent e){
            final Player p = e.getEntity();
            plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new Runnable(){
                public void run(){
                    if (p.isDead()){
                        ((CraftPlayer)p).getHandle().playerConnection.a(new PacketPlayInClientCommand(EnumClientCommand.PERFORM_RESPAWN));
                    }
                }
            });
        }
     
    }
    This code should disable the Respawn screen :)
     
Thread Status:
Not open for further replies.

Share This Page