Hi! We run an RP server with our own inventory (native inventory menu disabled with setNativeMenuEnabled("inventory", false)). Everything else works well, but two things are impossible without native functions:
Unequip one weapon slot / give Fists back.
setPlayerWeapon(id, "none") clears both the melee and ranged slots and also removes Fists from the hotbar. Fists aren’t in any catalog (getPlayerWeaponNames, getPlayerItemCount), so the server can’t return them.
Suggestion: setPlayerWeapon(id, "none", "melee"|"ranged") to clear only one slot, and/or a way to restore Fists (e.g. "fists" key).
Equip runes / spells from the server.
A rune given with givePlayerItem stays in the inventory. There is no function to put it in hand or on a hotbar slot (setPlayerWeapon with a rune key returns false; grantPlayerSpell only grants the spell).
Suggestion: setPlayerSpell(id, runeKey) or setPlayerHotbarSlot(id, slot, itemKey).
(Bonus) Fall death event. Fall death shows the native Game Over screen, but the server gets no onPlayerDeath / life-state change. An event or a server-side kill would let gamemodes handle it.
Unequip one weapon slot / give Fists back.
setPlayerWeapon(id, "none") clears both the melee and ranged slots and also removes Fists from the hotbar. Fists aren’t in any catalog (getPlayerWeaponNames, getPlayerItemCount), so the server can’t return them.
Suggestion: setPlayerWeapon(id, "none", "melee"|"ranged") to clear only one slot, and/or a way to restore Fists (e.g. "fists" key).
Equip runes / spells from the server.
A rune given with givePlayerItem stays in the inventory. There is no function to put it in hand or on a hotbar slot (setPlayerWeapon with a rune key returns false; grantPlayerSpell only grants the spell).
Suggestion: setPlayerSpell(id, runeKey) or setPlayerHotbarSlot(id, slot, itemKey).
(Bonus) Fall death event. Fall death shows the native Game Over screen, but the server gets no onPlayerDeath / life-state change. An event or a server-side kill would let gamemodes handle it.