Skip to content

Commit

Permalink
Paradox3.4.6版作りました!!
Browse files Browse the repository at this point in the history
  • Loading branch information
gamelist1990 committed Dec 11, 2023
1 parent 8f77e07 commit a452aeb
Show file tree
Hide file tree
Showing 10 changed files with 49 additions and 24 deletions.
12 changes: 6 additions & 6 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -17,15 +17,15 @@
},
"metadata": {
"authors": [
"Visual1mpact, Pete9xi"
"Visual1mpact, Pete9xi, koukun_"
],
"license": "GPLv3",
"url": "https://github.com/Pete9xi/Paradox_AntiCheat"
},
"modules": [
{
"type": "data",
"uuid": "d8395127-6923-4fb7-93d2-977cecd463e0",
"uuid": "de17215f-5a9a-4c18-bfb3-5f594a851f9f",
"version": [
1,
0,
Expand All @@ -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,
Expand Down
10 changes: 5 additions & 5 deletions src/commands/moderation/modules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 モジュールのリスト.`,
Expand All @@ -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)}`,
Expand All @@ -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無効"}.`,
]);
}
6 changes: 4 additions & 2 deletions src/commands/settings/oneplayersleep.ts
Original file line number Diff line number Diff line change
@@ -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";

Expand Down Expand Up @@ -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":
Expand All @@ -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;
}
Expand Down
1 change: 1 addition & 0 deletions src/commands/utility/sethome.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`,
Expand Down
10 changes: 5 additions & 5 deletions src/data/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -220,7 +220,7 @@ export default {
message: "ホットバー通知", // Put Message inside the quotes
},
ops: {
enabled: false,
enabled: true,
},
salvage: {
enabled: false,
Expand Down Expand Up @@ -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: "",
},
};
2 changes: 0 additions & 2 deletions src/paradox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -104,7 +103,6 @@ async function main() {
ClearLag();
BadPackets2();
VerifyPermission;
OPS();
Hotbar();
NoPerms;
Vanish;
Expand Down
2 changes: 1 addition & 1 deletion src/penrose/TickEvent/clearlag/clearlag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
6 changes: 5 additions & 1 deletion src/penrose/TickEvent/fly/fly_a.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/penrose/TickEvent/oneplayersleep/oneplayersleep.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 おはよ`);
}
}

Expand Down
22 changes: 21 additions & 1 deletion src/penrose/TickEvent/speed/speed_a.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -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];
Expand Down

0 comments on commit a452aeb

Please sign in to comment.