新增2接口2事件

- 新增getMaxPlayers和dropPlayerItem接口
- 新增handleRequestTryAction和handleRequestAction事件
This commit is contained in:
子沐呀
2024-06-26 20:28:16 +08:00
Unverified
parent ea9934f315
commit 5afb0f8433
8 changed files with 201 additions and 5 deletions
+5
View File
@@ -743,4 +743,9 @@ void Export_Compatibility_API() {
RemoteCall::exportAs("GMLIB_API", "getEnchantNameAndLevel", [](int id, int level) -> std::string {
return EnchantUtils::getEnchantNameAndLevel((Enchant::Type)id, level);
});
RemoteCall::exportAs(
"GMLIB_API",
"dropPlayerItem",
[](Player* player, ItemStack const* item, bool randomly) -> bool { return player->drop(*item, randomly); }
);
}