diff --git a/devFolder/src/command/langs/list/ja_JP.json b/devFolder/src/command/langs/list/ja_JP.json index a944ef5..ae9773d 100644 --- a/devFolder/src/command/langs/list/ja_JP.json +++ b/devFolder/src/command/langs/list/ja_JP.json @@ -402,7 +402,7 @@ }, "tpaRequestTimedOut": { "msgid": "§3 TPA request from §6{playerName}§3 has timed out.", - "msgstr": "§b{playerName}§6に送ったTPAリクエストがタイムアウトしました!" + "msgstr": "§b{playerName}§6宛てのTPAリクエストがタイムアウトしました!" }, "jpchCom": { "msgid": "§2 Functions like LunaChat.", diff --git a/devFolder/src/command/langs/list/ja_JP.ts b/devFolder/src/command/langs/list/ja_JP.ts index 09c7472..aec7873 100644 --- a/devFolder/src/command/langs/list/ja_JP.ts +++ b/devFolder/src/command/langs/list/ja_JP.ts @@ -357,7 +357,7 @@ export const translations = { }, "tpaRequestTimedOut": { msgid: "§3 TPA request from §6{playerName}§3 has timed out.", - msgstr: "§b{playerName}§6に送ったTPAリクエストがタイムアウトしました!" + msgstr: "§b{playerName}§6宛てのTPAリクエストがタイムアウトしました!" }, "jpchCom": { msgid: "§2 Functions like LunaChat.", diff --git a/devFolder/src/command/plugin/chest.ts b/devFolder/src/command/plugin/chest.ts index fda77d4..f560068 100644 --- a/devFolder/src/command/plugin/chest.ts +++ b/devFolder/src/command/plugin/chest.ts @@ -11,6 +11,8 @@ interface ChestProtectionData { members: string[]; } +const CHEST_CHECK_RADIUS = 64; + const CHECK_INTERVAL = 20 * 60; // 1分 (20ティック/秒 * 60秒) let protectedChests: Record = {}; @@ -435,18 +437,29 @@ async function revertChest(location: Vector3) { } function checkProtectedChests() { + const players = world.getPlayers(); // オンラインのプレイヤーを取得 + for (const chestKey in protectedChests) { const location = parseChestKey(chestKey); const dimension = world.getDimension('overworld'); - try { - const block = dimension.getBlock(location); - if (!isChest(block)) { - delete protectedChests[chestKey]; - console.warn(`Removed data for non-existent chest at ${chestKey}`); + // プレイヤーがチェストの近くにいたらチェックを行う + const isPlayerNearby = players.some(player => + Math.abs(player.location.x - location.x) <= CHEST_CHECK_RADIUS && + Math.abs(player.location.y - location.y) <= CHEST_CHECK_RADIUS && + Math.abs(player.location.z - location.z) <= CHEST_CHECK_RADIUS + ); + + if (isPlayerNearby) { + try { + const block = dimension.getBlock(location); + if (!isChest(block)) { + delete protectedChests[chestKey]; + console.warn(`Removed data for non-existent chest at ${chestKey}`); + } + } catch (error) { + console.warn(`Chunk at ${location} is not loaded.`); } - } catch (error) { - console.warn(`Chunk at ${location} is not loaded.`); } } saveProtectedChests(); diff --git a/devFolder/src/command/plugin/packet.ts b/devFolder/src/command/plugin/packet.ts index 0a53cb1..debcff1 100644 --- a/devFolder/src/command/plugin/packet.ts +++ b/devFolder/src/command/plugin/packet.ts @@ -374,14 +374,14 @@ function detectAirJump(player: Player): { cheatType: string } | null { const jumpHeight = currentPosition.y - Math.min(previousPosition.y, twoTicksAgoPosition.y); if ( - jumpHeight > 1.0 || + jumpHeight > 1.5 || horizontalAcceleration > 2.1 || (verticalAcceleration > 1.3 && previousVerticalAcceleration > 0.8) || velocityChangeRate > 0.9 || (player.isJumping && horizontalSpeed > 0.9) ) { data.jumpCounter++; - if (data.jumpCounter >= 1) { + if (data.jumpCounter >= 2) { return { cheatType: '(AirJump|Fly)' }; // 通常のAirJumpとして検出 } } @@ -592,7 +592,7 @@ function getExcludedEffects(): string[] { function checkPlayerSpeed(player: Player): { cheatType: string } | null { const speed = calculatePlayerSpeed(player); const data = playerData[player.id]; - const maxAllowedSpeed = 0.6; + const maxAllowedSpeed = 0.7; @@ -782,7 +782,7 @@ function runTick(): void { - player.runCommandAsync(`titleraw @s actionbar {"rawtext":[{"text":"§a現在Pingシステム実験中: ${playerData[playerId].spikeLaggingData.pingStatus} tick/ping"}]}`); + //player.runCommandAsync(`titleraw @s actionbar {"rawtext":[{"text":"§a現在Pingシステム実験中: ${playerData[playerId].spikeLaggingData.pingStatus} tick/ping"}]}`); diff --git a/devFolder/src/command/utility/tpa.ts b/devFolder/src/command/utility/tpa.ts index ab15f70..a7949cc 100644 --- a/devFolder/src/command/utility/tpa.ts +++ b/devFolder/src/command/utility/tpa.ts @@ -113,7 +113,7 @@ registerCommand({ const targetPlayer = player.dimension.getPlayers().find((p) => p.name === args[1]); if (!targetPlayer) { - player.sendMessage(translate(player, 'playerNotFound', { playerName: args[1] })); + player.sendMessage(translate(player, 'PlayerNotFound', { playerName: args[1] })); return; }