修复getPlayerUIItem接口问题
This commit is contained in:
Vendored
+1
-1
@@ -1053,7 +1053,7 @@ interface Player {
|
|||||||
): void;
|
): void;
|
||||||
|
|
||||||
/** (GMLIB)获取玩家UI栏物品 */
|
/** (GMLIB)获取玩家UI栏物品 */
|
||||||
setPlayerUIItem(
|
getPlayerUIItem(
|
||||||
/** 槽位 */
|
/** 槽位 */
|
||||||
slot: number
|
slot: number
|
||||||
): Item;
|
): Item;
|
||||||
|
|||||||
+1
-1
@@ -2448,7 +2448,7 @@ LLSE_Player.prototype.setPlayerUIItem =
|
|||||||
return GMLIB_API.setPlayerUIItem(this, slot, item);
|
return GMLIB_API.setPlayerUIItem(this, slot, item);
|
||||||
}
|
}
|
||||||
|
|
||||||
LLSE_Player.prototype.setPlayerUIItem =
|
LLSE_Player.prototype.getPlayerUIItem =
|
||||||
/**
|
/**
|
||||||
* 获取玩家UI栏物品
|
* 获取玩家UI栏物品
|
||||||
* @param {number} slot 格子槽位
|
* @param {number} slot 格子槽位
|
||||||
|
|||||||
@@ -865,7 +865,7 @@ void Export_Compatibility_API() {
|
|||||||
RemoteCall::exportAs("GMLIB_API", "setPlayerUIItem", [](Player* player, int slot, ItemStack const* item) -> void {
|
RemoteCall::exportAs("GMLIB_API", "setPlayerUIItem", [](Player* player, int slot, ItemStack const* item) -> void {
|
||||||
player->setPlayerUIItem((PlayerUISlot)slot, *item);
|
player->setPlayerUIItem((PlayerUISlot)slot, *item);
|
||||||
});
|
});
|
||||||
RemoteCall::exportAs("GMLIB_API", "getPlayerUIItem", [](Player* player, int slot) -> void {
|
RemoteCall::exportAs("GMLIB_API", "getPlayerUIItem", [](Player* player, int slot) -> ItemStack* {
|
||||||
player->getPlayerUIItem((PlayerUISlot)slot);
|
return const_cast<ItemStack*>(&player->getPlayerUIItem((PlayerUISlot)slot));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user