修复getPlayerUIItem接口问题

This commit is contained in:
子沐呀
2024-07-20 17:24:56 +08:00
Unverified
parent cd088431f3
commit 7af336e4b0
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -865,7 +865,7 @@ void Export_Compatibility_API() {
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);
RemoteCall::exportAs("GMLIB_API", "getPlayerUIItem", [](Player* player, int slot) -> ItemStack* {
return const_cast<ItemStack*>(&player->getPlayerUIItem((PlayerUISlot)slot));
});
}