mirror of
https://github.com/danbulant/flying-squid
synced 2026-06-15 20:41:14 +00:00
Updated the api
This commit is contained in:
parent
d1cfcc7367
commit
64630e8fb6
2 changed files with 22 additions and 0 deletions
12
doc/api.md
12
doc/api.md
|
|
@ -24,6 +24,9 @@
|
|||
- [entity.equipment[5]](#entityequipment5)
|
||||
- [entity.heldItem](#entityhelditem)
|
||||
- [entity.metadata](#entitymetadata)
|
||||
- [entity.healt](#entityhealt)
|
||||
- [entity.food](#entityfood)
|
||||
- [entity.player](#entityplayer)
|
||||
- [MCServer](#mcserver)
|
||||
- [CraftyJS.createMCServer(options)](#craftyjscreatemcserveroptions)
|
||||
- [Properties](#properties)
|
||||
|
|
@ -144,6 +147,15 @@ Equivalent to `entity.equipment[0]`.
|
|||
|
||||
See http://wiki.vg/Entities#Entity_Metadata_Format for more details.
|
||||
|
||||
#### entity.healt
|
||||
The health of the player, default: 20
|
||||
|
||||
#### entity.food
|
||||
The food of the player, default: 20
|
||||
|
||||
#### entity.player
|
||||
The player
|
||||
|
||||
## MCServer
|
||||
|
||||
### CraftyJS.createMCServer(options)
|
||||
|
|
|
|||
10
lib/playerPlugins/respawn.js
Normal file
10
lib/playerPlugins/respawn.js
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
module.exports=inject;
|
||||
|
||||
function inject(serv, player)
|
||||
{
|
||||
player._client.on("client_command", function(packet) {
|
||||
if(packet.payload == 0) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
Loading…
Reference in a new issue