mirror of
https://github.com/danbulant/flying-squid
synced 2026-06-17 21:41:06 +00:00
18 lines
No EOL
399 B
JavaScript
18 lines
No EOL
399 B
JavaScript
module.exports=inject;
|
|
|
|
function inject(serv, player)
|
|
{
|
|
player._client.on("client_command", function(packet) {
|
|
if(packet.payload == 0) {
|
|
player._client.write("respawn",{
|
|
dimension:0,
|
|
difficulty:0,
|
|
gamemode:player.gameMode,
|
|
levelType:'default'
|
|
});
|
|
player.sendInitialPosition();
|
|
player.updateHealth(20);
|
|
player.spawn();
|
|
}
|
|
});
|
|
} |