mirror of
https://github.com/danbulant/flying-squid
synced 2026-07-05 03:00:46 +00:00
Create inventory.js
InventoryAPI
This commit is contained in:
parent
dd4e56ab1d
commit
23126e1c69
1 changed files with 11 additions and 0 deletions
11
lib/playerPlugins/inventory.js
Normal file
11
lib/playerPlugins/inventory.js
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
module.exports=inject;
|
||||||
|
|
||||||
|
function inject(serv, player)
|
||||||
|
{
|
||||||
|
heldItemSlot=0;
|
||||||
|
player._client.on("held_item_slot", function (packet) {
|
||||||
|
heldItemSlot = packet.slotId;
|
||||||
|
});
|
||||||
|
|
||||||
|
player.heldItemSlot = heldItemSlot;
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue