feat: add setMaxPlayers api

This commit is contained in:
zimuya4153
2025-08-17 17:08:43 +08:00
Unverified
parent 2b18aeb245
commit 446cc68f32
3 changed files with 25 additions and 1 deletions
+9 -1
View File
@@ -359,7 +359,7 @@ export class Minecraft {
): string;
/** 通过附魔ID获取附魔命名空间ID */
static getMaxPlayers(
static getEnchantTypeNameFromId(
/** 附魔ID */
id: number
): string | null;
@@ -367,6 +367,14 @@ export class Minecraft {
/** 获取最大玩家数 */
static getMaxPlayers(): number;
/** 设置最大玩家数 */
static setMaxPlayers(
/** 最大玩家数 */
count: number,
/** 是否忽略原版限制 */
ignoreVanillaLimit?: boolean
): void;
/** 玩家是否拥有NBT */
static hasPlayerNbt(
/** 玩家的uuid */