diff --git a/manifest.json b/manifest.json index 7eab0f5..4037c6c 100644 --- a/manifest.json +++ b/manifest.json @@ -1,9 +1,9 @@ { "format_version": 2, "header": { - "name": "Paradox AntiCheat", - "description": "A utility to fight against malicious hackers on Bedrock Edition ~ v3.4.4", - "uuid": "54edfea5-ab51-47ca-b992-724e255b5560", + "name": "Paradox AntiCheat3.4.6日本語!!", + "description": "Bedrock Edition で悪意のあるハッカーと戦うためのアンチチート日本語版 ~ v3.4.6", + "uuid": "46bbb93f-f68e-4c4c-823b-526a768f95bf", "version": [ 3, 4, @@ -17,7 +17,7 @@ }, "metadata": { "authors": [ - "Visual1mpact, Pete9xi" + "Visual1mpact, Pete9xi, koukun_" ], "license": "GPLv3", "url": "https://github.com/Pete9xi/Paradox_AntiCheat" @@ -25,7 +25,7 @@ "modules": [ { "type": "data", - "uuid": "d8395127-6923-4fb7-93d2-977cecd463e0", + "uuid": "de17215f-5a9a-4c18-bfb3-5f594a851f9f", "version": [ 1, 0, @@ -36,7 +36,7 @@ "description": "Paradox AntiCheat Gametest Features", "language": "javascript", "type": "script", - "uuid": "1326c87b-37f3-4543-9f0f-0d03893134e1", + "uuid": "ff22c5e4-908c-48e5-bf88-5ab73c86fbab", "version": [ 0, 0, diff --git a/src/commands/moderation/modules.ts b/src/commands/moderation/modules.ts index 1e41a61..f45ddd9 100644 --- a/src/commands/moderation/modules.ts +++ b/src/commands/moderation/modules.ts @@ -117,7 +117,7 @@ export function modules(message: ChatSendAfterEvent, args: string[]) { //ベクター const spawnProtectionVector3 = configuration.modules.spawnprotection.vector3; - const status = (b: string | number | boolean | Vector3) => (b ? "§aBoolean" : "§4無効"); + const status = (b: string | number | boolean | Vector3) => (b ? "§a有効" : "§4無効"); sendMsgToPlayer(player, [ `§f§4[§6Paradox§4]§f モジュールのリスト.`, @@ -139,8 +139,8 @@ export function modules(message: ChatSendAfterEvent, args: string[]) { `§o§6|§f InvalidSprintA: ${status(InvalidSprintABoolean)}`, `§o§6|§f FlyA: ${status(flyABoolean)}`, `§o§6|§f AntiFallA: ${status(antiFallABoolean)}`, - `§o§6|§f IllegalItemsA: ${illegalItemsABoolean ? `§aBoolean§f [Ban Illegal Stacks: ${status(stackBanBoolean)}§f]` : "§4無効"}.`, - `§o§6|§f IllegalItemsB: ${illegalItemsBBoolean ? `§aBoolean§f [Ban Illegal Stacks: ${status(stackBanBoolean)}§f]` : "§4無効"}.`, + `§o§6|§f IllegalItemsA: ${illegalItemsABoolean ? `§a有効§f [Ban Illegal Stacks: ${status(stackBanBoolean)}§f]` : "§4無効"}.`, + `§o§6|§f IllegalItemsB: ${illegalItemsBBoolean ? `§a有効§f [Ban Illegal Stacks: ${status(stackBanBoolean)}§f]` : "§4無効"}.`, `§o§6|§f IllegalItemsC: ${status(illegalItemsCBoolean)}`, `§o§6|§f IllegalEnchantments: ${status(illegalEnchantmentBoolean)}`, `§o§6|§f IllegalLores: ${status(illegalLoresBoolean)}`, @@ -160,12 +160,12 @@ export function modules(message: ChatSendAfterEvent, args: string[]) { `§o§6|§f Anti-KillAura: ${status(antiKillAuraBoolean)}`, `§o§6|§f Anti-Enchanted: ${status(encharmor)}`, `§o§6|§f Autoclicker: ${status(autoclickerBoolean)}`, - `§o§6|§f World Border: ${worldBorderBoolean ? `§aBoolean§f (Overworld: §6${worldBorderOverworldNumber}§f Nether: §6${worldBorderNetherNumber}§f End: §6${worldBorderEndNumber}§f)` : "§4無効"}.`, + `§o§6|§f World Border: ${worldBorderBoolean ? `§a有効§f (Overworld: §6${worldBorderOverworldNumber}§f Nether: §6${worldBorderNetherNumber}§f End: §6${worldBorderEndNumber}§f)` : "§4無効"}.`, `§o§6|§f ClearLag: ${status(clearLagBoolean)}`, `§o§6|§f ShowRules: ${status(showrulesBoolean)}`, `§o§6|§f AutoBan: ${status(autobanBoolean)}`, `§o§6|§f AFK: ${status(afkBoolean)}`, `§o§6|§f AntiPhaseA: ${status(antiPhaseABoolean)}`, - `§o§6|§f Spawn Protection: ${spawnprotectionBoolean ? `§aBoolean§f (X: §6${spawnProtectionVector3.x}§f Y: §6${spawnProtectionVector3.y}§f Z: §6${spawnProtectionVector3.z}§f Radius: §6${spawnProtectionRadius}§f)` : "§4無効"}.`, + `§o§6|§f Spawn Protection: ${spawnprotectionBoolean ? `§a有効§f (X: §6${spawnProtectionVector3.x}§f Y: §6${spawnProtectionVector3.y}§f Z: §6${spawnProtectionVector3.z}§f Radius: §6${spawnProtectionRadius}§f)` : "§4無効"}.`, ]); } diff --git a/src/commands/settings/oneplayersleep.ts b/src/commands/settings/oneplayersleep.ts index 76ae2dc..aa432df 100644 --- a/src/commands/settings/oneplayersleep.ts +++ b/src/commands/settings/oneplayersleep.ts @@ -1,6 +1,5 @@ import { getPrefix, sendMsg, sendMsgToPlayer } from "../../util.js"; import { ChatSendAfterEvent, Player } from "@minecraft/server"; -import { OPS } from "../../penrose/TickEvent/oneplayersleep/oneplayersleep.js"; import { dynamicPropertyRegistry } from "../../penrose/WorldInitializeAfterEvent/registry.js"; import ConfigInterface from "../../interfaces/Config.js"; @@ -111,7 +110,8 @@ async function handleOps(message: ChatSendAfterEvent, args: string[]) { configuration.modules.ops.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 以下の機能が有効です=> §6OPS§f!`); - OPS(); + //Use the native inbuilt gamerule + player.runCommandAsync(`/gamerule playersSleepingPercentage 1`); } break; case "-d": @@ -124,6 +124,8 @@ async function handleOps(message: ChatSendAfterEvent, args: string[]) { configuration.modules.ops.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f は無効 §4OPS§f!`); + //Use the native inbuilt gamerule + player.runCommandAsync(`/gamerule playersSleepingPercentage 100`); } break; } diff --git a/src/commands/utility/sethome.ts b/src/commands/utility/sethome.ts index 5b9c277..4912d58 100644 --- a/src/commands/utility/sethome.ts +++ b/src/commands/utility/sethome.ts @@ -109,6 +109,7 @@ function setHomeHelp(player: Player, prefix: string, configuration: ConfigInterf ` §4[§7セットホーム§4の現在のステータスを表示する]§f`, `§4[§6例§4]§f:`, ` ${prefix}sethome --name barn`, + ` ${prefix}sethome --n barn`, ` ${prefix}sethome --help`, ` ${prefix}sethome --max ${configuration.modules.setHome.max}`, ` ${prefix}sethome --disable`, diff --git a/src/data/config.ts b/src/data/config.ts index 81147d1..f401adf 100644 --- a/src/data/config.ts +++ b/src/data/config.ts @@ -104,12 +104,12 @@ export default { enabled: true, }, namespoofA: { - enabled: true, + enabled: false, minNameLength: 3, maxNameLength: 16, }, namespoofB: { - enabled: true, + enabled: false, // eslint-disable-next-line no-control-regex banregex: /[^\x00-\x7F]|[/:\\*?"<>]|^\.$|\.$/gu, // Deny any invalid character not within the scope of this regex @@ -220,7 +220,7 @@ export default { message: "ホットバー通知", // Put Message inside the quotes }, ops: { - enabled: false, + enabled: true, }, salvage: { enabled: false, @@ -284,9 +284,9 @@ export default { * This is required for Realm users to gain Paradox-Op. * * Anyone else is welcome to use this if they like but - * are not obligated. + * レルムズの人はここにパスワードを入れてください!! */ encryption: { - password: "HACKERBAN", + password: "", }, }; diff --git a/src/paradox.ts b/src/paradox.ts index fbdd298..416fca7 100644 --- a/src/paradox.ts +++ b/src/paradox.ts @@ -24,7 +24,6 @@ import { Survival } from "./penrose/TickEvent/gamemode/survival.js"; import { Adventure } from "./penrose/TickEvent/gamemode/adventure.js"; import { Creative } from "./penrose/TickEvent/gamemode/creative.js"; import { IllegalItemsC } from "./penrose/TickEvent/illegalitems/illegalitems_c.js"; -import { OPS } from "./penrose/TickEvent/oneplayersleep/oneplayersleep.js"; import { Hotbar } from "./penrose/TickEvent/hotbar/hotbar.js"; import { VerifyPermission } from "./penrose/TickEvent/noperms/verifypermission.js"; import { BadPackets2 } from "./penrose/TickEvent/badpackets2/badpackets2.js"; @@ -104,7 +103,6 @@ async function main() { ClearLag(); BadPackets2(); VerifyPermission; - OPS(); Hotbar(); NoPerms; Vanish; diff --git a/src/penrose/TickEvent/clearlag/clearlag.ts b/src/penrose/TickEvent/clearlag/clearlag.ts index 4318255..04e92e9 100644 --- a/src/penrose/TickEvent/clearlag/clearlag.ts +++ b/src/penrose/TickEvent/clearlag/clearlag.ts @@ -62,7 +62,7 @@ function clearLag(id: number) { const countdown = createCountdown(configuration); - const msSettings = countdown.days * 24 * 60 * 60 + countdown.hours * 60 * 60 + countdown.minutes * 60 + countdown.seconds * 1000; + const msSettings = countdown.days * 24 * 60 * 60 * 1000 + countdown.hours * 60 * 60 * 1000 + countdown.minutes * 60 * 1000 + countdown.seconds * 1000; const timePassed = Date.now() - cooldownVerify; const timeLeft = msSettings - timePassed; diff --git a/src/penrose/TickEvent/fly/fly_a.ts b/src/penrose/TickEvent/fly/fly_a.ts index d816d87..b490d6c 100644 --- a/src/penrose/TickEvent/fly/fly_a.ts +++ b/src/penrose/TickEvent/fly/fly_a.ts @@ -151,7 +151,11 @@ function flya(id: number) { if (uniqueId === player.name) { continue; } - + //Check if the player is gliding... temp fix! + const glideCheck = player.isGliding; + if (glideCheck) { + continue; + } const fallCheck = player.isFalling; if (fallCheck) { // Record falling data diff --git a/src/penrose/TickEvent/oneplayersleep/oneplayersleep.ts b/src/penrose/TickEvent/oneplayersleep/oneplayersleep.ts index 720e8de..a98fa54 100644 --- a/src/penrose/TickEvent/oneplayersleep/oneplayersleep.ts +++ b/src/penrose/TickEvent/oneplayersleep/oneplayersleep.ts @@ -15,7 +15,7 @@ async function queueSleep(player: Player) { const configuration = getRegistry(); const hotbarBoolean = configuration.modules.hotbar.enabled; if (hotbarBoolean === undefined || hotbarBoolean === false) { - player.runCommand(`title @a[tag=!vanish] actionbar おはよ`); + player.runCommand(`title @a[tag=!vanish] actionbar おはよ!`); } } diff --git a/src/penrose/TickEvent/speed/speed_a.ts b/src/penrose/TickEvent/speed/speed_a.ts index b5c2dac..c8c0d38 100644 --- a/src/penrose/TickEvent/speed/speed_a.ts +++ b/src/penrose/TickEvent/speed/speed_a.ts @@ -1,4 +1,4 @@ -import { world, system, EntityQueryOptions, GameMode, PlayerLeaveAfterEvent, EntityHurtAfterEvent, PlayerSpawnAfterEvent } from "@minecraft/server"; +import { world, system, EntityQueryOptions, GameMode, PlayerLeaveAfterEvent, EntityHurtAfterEvent, PlayerSpawnAfterEvent, EntityEquippableComponent, EquipmentSlot, Enchantment, ItemEnchantsComponent } from "@minecraft/server"; import { flag, isTimerExpired } from "../../../util.js"; import { dynamicPropertyRegistry } from "../../WorldInitializeAfterEvent/registry.js"; import ConfigInterface from "../../../interfaces/Config.js"; @@ -104,6 +104,26 @@ function speeda(id: number) { if (rideCheck) { continue; } + //trident check + const equipment = player.getComponent("equippable") as EntityEquippableComponent; + const mainhand = equipment.getEquipment(EquipmentSlot.Mainhand); + if (mainhand && mainhand.typeId === "minecraft:trident") { + const enchantmentsComponent = mainhand.getComponent("minecraft:enchantments") as ItemEnchantsComponent; + const enchantmentList = enchantmentsComponent.enchantments; + const iterator = enchantmentList[Symbol.iterator](); + let iteratorResult = iterator.next(); + let targetEnchant = false; + while (!iteratorResult.done) { + const enchantment: Enchantment = iteratorResult.value; + if (enchantment.type.id === "riptide") { + targetEnchant = true; + } + iteratorResult = iterator.next(); + } + if (targetEnchant === true) { + continue; + } + } const playerName = player.id; const playerPosition = [player.location.x, player.location.y, player.location.z];