新增hasPlayerNbt接口

This commit is contained in:
子沐呀
2024-07-23 08:45:43 +08:00
Unverified
parent f427f2f5e1
commit a5eb2e855a
3 changed files with 28 additions and 11 deletions
+7 -7
View File
@@ -879,11 +879,11 @@ void Export_Compatibility_API() {
InventorySlotPacket((ContainerID)containerId, slot, *item).sendTo(*player);
}
);
RemoteCall::exportAs(
"GMLIB_API",
"getContainerType",
[](Container* container) -> std::string {
return magic_enum::enum_name(container->getContainerType()).data();
}
);
RemoteCall::exportAs("GMLIB_API", "getContainerType", [](Container* container) -> std::string {
return magic_enum::enum_name(container->getContainerType()).data();
});
RemoteCall::exportAs("GMLIB_API", "hasPlayerNbt", [](std::string const& uuid) -> bool {
auto uid = mce::UUID::fromString(uuid);
return GMLIB_Player::getPlayerNbt(uid) ? true : false;
});
}