添加2个接口

- setPlayerUIItem
- getPlayerUIItem
This commit is contained in:
子沐呀
2024-07-20 17:00:47 +08:00
Unverified
parent ed472f10d8
commit cd088431f3
3 changed files with 45 additions and 1 deletions
+6
View File
@@ -862,4 +862,10 @@ void Export_Compatibility_API() {
}
return false;
});
RemoteCall::exportAs("GMLIB_API", "setPlayerUIItem", [](Player* player, int slot, ItemStack const* item) -> void {
player->setPlayerUIItem((PlayerUISlot)slot, *item);
});
RemoteCall::exportAs("GMLIB_API", "getPlayerUIItem", [](Player* player, int slot) -> void {
player->getPlayerUIItem((PlayerUISlot)slot);
});
}