From 062369815adbba99c0a90381fd4652a5970996d0 Mon Sep 17 00:00:00 2001 From: Blazer Date: Sat, 10 Jun 2023 16:02:59 -0400 Subject: [PATCH] v1.6.2 --- Safeguard anti-cheat B/entities/player.json | 476 ------------------ .../functions/anti/anti_cbe.mcfunction | 12 +- .../functions/anti/anti_crash.mcfunction | 2 - .../functions/anti/anti_items.mcfunction | 172 ------- .../functions/assets/asset.mcfunction | 38 +- .../functions/assets/death_coords.mcfunction | 5 - .../functions/assets/illegal_item.mcfunction | 3 - .../functions/credit.mcfunction | 2 +- .../functions/punishment/ban/ban.mcfunction | 9 - .../freeze/Script Testing/manifest.json | 59 +++ .../freeze/Script Testing/pack_icon.png | Bin 0 -> 14054 bytes .../freeze/Script Testing/scripts/index.js | 26 + .../scripts/misc/afkDetection.js | 76 +++ .../Script Testing/scripts/misc/chestLock.js | 22 + .../scripts/misc/combatlogging.js | 42 ++ .../punishment/freeze/freeze.mcfunction | 2 +- .../punishment/softban/softunban.mcfunction | 2 +- .../functions/settings/32k.mcfunction | 16 - .../functions/settings/crasher.mcfunction | 16 - .../functions/settings/lock_end.mcfunction | 4 +- .../functions/settings/namespoof.mcfunction | 16 - .../functions/setup/setup.mcfunction | 3 +- Safeguard anti-cheat B/manifest.json | 63 +-- Safeguard anti-cheat B/scripts/config.js | 15 + Safeguard anti-cheat B/scripts/index.js | 431 ++++++++-------- Safeguard anti-cheat B/texts/en_US.lang | 4 +- 26 files changed, 504 insertions(+), 1012 deletions(-) delete mode 100644 Safeguard anti-cheat B/entities/player.json delete mode 100644 Safeguard anti-cheat B/functions/anti/anti_crash.mcfunction delete mode 100644 Safeguard anti-cheat B/functions/anti/anti_items.mcfunction delete mode 100644 Safeguard anti-cheat B/functions/assets/death_coords.mcfunction delete mode 100644 Safeguard anti-cheat B/functions/assets/illegal_item.mcfunction delete mode 100644 Safeguard anti-cheat B/functions/punishment/ban/ban.mcfunction create mode 100644 Safeguard anti-cheat B/functions/punishment/freeze/Script Testing/manifest.json create mode 100644 Safeguard anti-cheat B/functions/punishment/freeze/Script Testing/pack_icon.png create mode 100644 Safeguard anti-cheat B/functions/punishment/freeze/Script Testing/scripts/index.js create mode 100644 Safeguard anti-cheat B/functions/punishment/freeze/Script Testing/scripts/misc/afkDetection.js create mode 100644 Safeguard anti-cheat B/functions/punishment/freeze/Script Testing/scripts/misc/chestLock.js create mode 100644 Safeguard anti-cheat B/functions/punishment/freeze/Script Testing/scripts/misc/combatlogging.js delete mode 100644 Safeguard anti-cheat B/functions/settings/32k.mcfunction delete mode 100644 Safeguard anti-cheat B/functions/settings/crasher.mcfunction delete mode 100644 Safeguard anti-cheat B/functions/settings/namespoof.mcfunction create mode 100644 Safeguard anti-cheat B/scripts/config.js diff --git a/Safeguard anti-cheat B/entities/player.json b/Safeguard anti-cheat B/entities/player.json deleted file mode 100644 index 872ad41..0000000 --- a/Safeguard anti-cheat B/entities/player.json +++ /dev/null @@ -1,476 +0,0 @@ -//bridge-file-version: #3 -{ - "format_version": "1.17.0", - "minecraft:entity": { - "description": { - "identifier": "minecraft:player", - "is_spawnable": false, - "is_summonable": false, - "is_experimental": false, - "scripts": { - "animate": [ - "death_effect", - "admin_panel", - "is_jumping", - "is_levitating", - "is_on_ground", - "is_gliding" - ] - }, - "animations": { - "death_effect": "controller.animation.death_effect", - "admin_panel": "controller.animation.settings", - "is_jumping": "controller.animation.is_jumping", - "is_levitating": "controller.animation.is_levitating", - "is_on_ground": "controller.animation.is_on_ground", - "is_gliding": "controller.animation.is_gliding" - } - }, - "component_groups": { - "minecraft:add_bad_omen": { - "minecraft:spell_effects": { - "add_effects": [ - { - "effect": "bad_omen", - "duration": 6000, - "display_on_screen_animation": true - } - ] - }, - "minecraft:timer": { - "time": [ - 0, - 0 - ], - "looping": false, - "time_down_event": { - "event": "minecraft:clear_add_bad_omen", - "target": "self" - } - } - }, - "minecraft:clear_bad_omen_spell_effect": { - "minecraft:spell_effects": {} - }, - "minecraft:raid_trigger": { - "minecraft:raid_trigger": { - "triggered_event": { - "event": "minecraft:remove_raid_trigger", - "target": "self" - } - }, - "minecraft:spell_effects": { - "remove_effects": "bad_omen" - } - }, - "safeguard:kick": { - "minecraft:instant_despawn": { - "remove_child_entities": true - } - }, - "safeguard:dialogue": { - "minecraft:npc": {} - } - }, - "components": { - "minecraft:experience_reward": { - "on_death": "Math.Min(query.player_level * 7, 100)" - }, - "minecraft:type_family": { - "family": [ - "player" - ] - }, - "minecraft:is_hidden_when_invisible": {}, - "minecraft:loot": { - "table": "loot_tables/empty.json" - }, - "minecraft:collision_box": { - "width": 0.6, - "height": 1.8 - }, - "minecraft:can_climb": {}, - "minecraft:movement": { - "value": 0.1 - }, - "minecraft:hurt_on_condition": { - "damage_conditions": [ - { - "filters": { - "test": "in_lava", - "subject": "self", - "operator": "==", - "value": true - }, - "cause": "lava", - "damage_per_tick": 4 - } - ] - }, - "minecraft:attack": { - "damage": 1 - }, - "minecraft:player.saturation": { - "value": 20 - }, - "minecraft:player.exhaustion": { - "value": 0, - "max": 4 - }, - "minecraft:player.level": { - "value": 0, - "max": 24791 - }, - "minecraft:player.experience": { - "value": 0, - "max": 1 - }, - "minecraft:breathable": { - "total_supply": 15, - "suffocate_time": -1, - "inhale_time": 3.75, - "generates_bubbles": false - }, - "minecraft:nameable": { - "always_show": true, - "allow_name_tag_renaming": false - }, - "minecraft:physics": {}, - "minecraft:pushable": { - "is_pushable": false, - "is_pushable_by_piston": true - }, - "minecraft:insomnia": { - "days_until_insomnia": 3 - }, - "minecraft:rideable": { - "seat_count": 2, - "family_types": [ - "parrot_tame" - ], - "pull_in_entities": true, - "seats": [ - { - "position": [ - 0.4, - -0.2, - -0.1 - ], - "min_rider_count": 0, - "max_rider_count": 0, - "lock_rider_rotation": 0 - }, - { - "position": [ - -0.4, - -0.2, - -0.1 - ], - "min_rider_count": 1, - "max_rider_count": 2, - "lock_rider_rotation": 0 - } - ] - }, - "minecraft:conditional_bandwidth_optimization": {}, - "minecraft:environment_sensor": { - "triggers": { - "filters": { - "all_of": [ - { - "test": "has_mob_effect", - "subject": "self", - "value": "bad_omen" - }, - { - "test": "is_in_village", - "subject": "self", - "value": true - } - ] - }, - "event": "minecraft:trigger_raid" - } - }, - "minecraft:despawn": { - "filters": { - "any_of": [ - { - "all_of": [ - { - "test": "has_tag", - "value": "admin", - "operator": "!=" - }, - { - "test": "has_tag", - "value": "Ban" - } - ] - } - ] - } - }, - "minecraft:scaffolding_climber": {}, - "minecraft:timer": { - "looping": true, - "time": 0.1, - "time_down_event": { - "filters": { - "any_of": [ - { - "all_of": [ - { - "test": "has_tag", - "value": "admin", - "operator": "!=" - }, - { - "test": "has_equipment", - "domain": "any", - "value": "minecraft:movingblock" - } - ] - }, - { - "all_of": [ - { - "test": "has_tag", - "value": "admin", - "operator": "!=" - }, - { - "test": "has_equipment", - "value": "minecraft:movingBlock", - "domain": "any" - } - ] - }, - { - "all_of": [ - { - "test": "has_tag", - "value": "admin", - "operator": "!=" - }, - { - "test": "has_equipment", - "domain": "any", - "value": "minecraft:fire" - } - ] - }, - { - "all_of": [ - { - "test": "has_tag", - "value": "admin", - "operator": "!=" - }, - { - "test": "has_equipment", - "domain": "any", - "value": "minecraft:lava" - } - ] - }, - { - "all_of": [ - { - "test": "has_tag", - "value": "admin", - "operator": "!=" - }, - { - "test": "has_equipment", - "domain": "any", - "value": "minecraft:water" - } - ] - }, - { - "all_of": [ - { - "test": "has_tag", - "value": "admin", - "operator": "!=" - }, - { - "test": "has_equipment", - "domain": "any", - "value": "minecraft:end_portal" - } - ] - }, - { - "all_of": [ - { - "test": "has_equipment", - "domain": "any", - "value": "minecraft:end_gateway" - }, - { - "test": "has_tag", - "value": "admin", - "operator": "!=" - } - ] - }, - { - "all_of": [ - { - "test": "has_tag", - "value": "admin", - "operator": "!=" - }, - { - "test": "has_equipment", - "domain": "any", - "value": "minecraft:soul_fire" - } - ] - }, - { - "all_of": [ - { - "test": "has_tag", - "value": "admin", - "operator": "!=" - }, - { - "test": "has_equipment", - "domain": "any", - "value": "minecraft:invisiblebedrock" - } - ] - }, - { - "all_of": [ - { - "test": "has_tag", - "value": "admin", - "operator": "!=" - }, - { - "test": "has_equipment", - "domain": "any", - "value": "minecraft:invisibleBedrock" - } - ] - }, - { - "all_of": [ - { - "test": "has_tag", - "value": "admin", - "operator": "!=" - }, - { - "test": "has_equipment", - "domain": "any", - "value": "minecraft:glowingobsidian" - } - ] - }, - { - "all_of": [ - { - "test": "has_tag", - "value": "admin", - "operator": "!=" - }, - { - "test": "has_equipment", - "domain": "any", - "value": "minecraft:portal" - } - ] - } - ] - }, - "event": "safeguard:item", - "target": "self" - } - } - }, - "events": { - "minecraft:gain_bad_omen": { - "add": { - "component_groups": [ - "minecraft:add_bad_omen" - ] - } - }, - "minecraft:clear_add_bad_omen": { - "remove": { - "component_groups": [ - "minecraft:add_bad_omen" - ] - }, - "add": { - "component_groups": [ - "minecraft:clear_bad_omen_spell_effect" - ] - } - }, - "minecraft:trigger_raid": { - "add": { - "component_groups": [ - "minecraft:raid_trigger" - ] - } - }, - "minecraft:remove_raid_trigger": { - "remove": { - "component_groups": [ - "minecraft:raid_trigger" - ] - } - }, - "safeguard:setup": { - "run_command": { - "command": [ - "scoreboard players set @a[scores={setup_success=0}] setup_success 1" - ] - } - }, - "safeguard:item": { - "run_command": { - "command": [ - "function assets/illegal_item", - "function punishment/warning/ill_warning" - ] - } - }, - "safeguard:kick": { - "add": { - "component_groups": [ - "safeguard:kick" - ] - } - }, - "safeguard:open_dialogue": { - "add": { - "component_groups": [ - "safeguard:dialogue" - ] - } - }, - "safeguard:close_dialogue": { - "remove": { - "component_groups": [ - "safeguard:dialogue" - ] - } - }, - "minecraft:has_levitation": { - "run_command": { - "target": "self", - "command": [ - "tag @s add Effect:Levitation" - ] - } - } - } - } -} \ No newline at end of file diff --git a/Safeguard anti-cheat B/functions/anti/anti_cbe.mcfunction b/Safeguard anti-cheat B/functions/anti/anti_cbe.mcfunction index fc10575..04138ce 100644 --- a/Safeguard anti-cheat B/functions/anti/anti_cbe.mcfunction +++ b/Safeguard anti-cheat B/functions/anti/anti_cbe.mcfunction @@ -1,7 +1,7 @@ #bridge-file-version: #97 tellraw @s {"rawtext":[{"text":"§6[§eSafeGuard§6]§r§c§l "},{"text":"ERROR: §r§4This function shouldn't be ran manually§r"}]} -# Stops players from using CBE(command block exploit) -#Detect and warn +# Stops players from using CBE(command block exploit) +#Detect and warn execute as @a[scores={anti_cbe_on=0}] run execute as @e[type=command_block_minecart,tag=!admin] run tellraw @a {"rawtext":[{"text":"§6[§eSafeGuard§6]§r§c§l "},{"selector":"@a[r=10,tag=!admin]"},{"text":" §r§4Were detected summoning a §l§ccommand block minecart!§r"}]} execute as @a[scores={anti_cbe_on=0}] run execute as @e[type=npc,tag=!admin,tag=!friend] run tellraw @a {"rawtext":[{"text":"§6[§eSafeGuard§6]§r§c§l "},{"selector":"@a[r=10,tag=!admin]"},{"text":" §r§4Were detected summoning a §l§cNPC!§r"}]} execute as @a[scores={anti_cbe_on=0}] run execute as @a[tag=!admin] run kill @e[type=item,name="tile.movingblock.name"] @@ -14,18 +14,16 @@ execute as @a[scores={anti_cbe_on=0}] run execute as @a[tag=!admin] run kill @e[ execute as @a[scores={anti_cbe_on=0}] run execute as @a[tag=!admin] run kill @e[type=item,name="§g§lBee Nest NPC Command"] execute as @a[scores={anti_cbe_on=0}] run execute as @a[tag=!admin] run kill @e[type=item,name="§g§lMovingBlock BeeNest NPC Command"] execute as @a[scores={anti_cbe_on=0}] run execute as @a[tag=!admin] run kill @e[type=item,name="§g§lInvisible Beehive NPC Command"] -execute as @a[scores={anti_cbe_on=0}] run execute as @a[tag=!admin] run kill @e[r=10,type=moving_block] -execute as @a[scores={anti_cbe_on=0}] run execute as @e[type=moving_block] run tellraw @a {"rawtext":[{"text":"§6[§eSafeGuard§6]§r§c§l "},{"selector":"@a[r=10,tag=!admin]"},{"text":" §r§4Was detected placing a §l§cMoving Block!§r"}]} -#Warning +#Warning execute as @a[scores={anti_cbe_on=0}] run execute as @e[type=command_block_minecart,tag=!admin] run execute as @a[r=10,tag=!admin] run function punishment/warning/cbe_warning execute as @a[scores={anti_cbe_on=0}] run execute as @e[type=npc,tag=!admin,tag=!friend] run execute as @a[r=10,tag=!admin] run function punishment/warning/cbe_warning -#Killing entities +#Killing entities execute as @a[scores={anti_cbe_on=0}] run kill @e[type=command_block_minecart] execute as @a[scores={anti_cbe_on=0}] run kill @e[type=npc,tag=!friend] execute as @a[scores={anti_cbe_on=0}] run kill @e[type=bee] execute as @a[scores={anti_cbe_on=0}] run kill @e[type=leash_knot] execute as @a[scores={anti_cbe_on=0}] run kill @e[type=armor_stand] -#replacing +#replacing execute as @a[scores={anti_cbe_on=0}] run execute as @a[tag=!admin] run fill ~8 ~5 ~8 ~-8 ~-5 ~-8 air 0 replace bee_nest execute as @a[scores={anti_cbe_on=0}] run execute as @a[tag=!admin] run fill ~8 ~5 ~8 ~-8 ~-5 ~-8 air 0 replace beehive execute as @a[scores={anti_cbe_on=0}] run execute as @a[tag=!admin] run fill ~8 ~5 ~8 ~-8 ~-5 ~-8 air 0 replace dispenser diff --git a/Safeguard anti-cheat B/functions/anti/anti_crash.mcfunction b/Safeguard anti-cheat B/functions/anti/anti_crash.mcfunction deleted file mode 100644 index c1e353d..0000000 --- a/Safeguard anti-cheat B/functions/anti/anti_crash.mcfunction +++ /dev/null @@ -1,2 +0,0 @@ -#bridge-file-version: #0 -execute @a[x=3000000,y=30000000,z=30000000,dx=16000000,dy=16000000,dz=16000000] ~~~ tp @s 0 300 0 \ No newline at end of file diff --git a/Safeguard anti-cheat B/functions/anti/anti_items.mcfunction b/Safeguard anti-cheat B/functions/anti/anti_items.mcfunction deleted file mode 100644 index c5f6593..0000000 --- a/Safeguard anti-cheat B/functions/anti/anti_items.mcfunction +++ /dev/null @@ -1,172 +0,0 @@ -#bridge-file-version: #1 -tellraw @s {"rawtext":[{"text":"§6[§eSafeGuard§6]§r§c§l "},{"text":"ERROR: §r§4This function shouldn't be ran manually§r"}]} -#warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=structure_void}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=structure_block}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=jigsaw}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=allow}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=deny}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=bedrock}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=command_block}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=repeating_command_block}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=chain_command_block}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=barrier}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=border_block}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=mob_spawner}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=command_block_minecart}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=end_portal_frame}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=bat_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=bee_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=blaze_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=cat_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=cave_spider_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=chicken_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=cod_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=cow_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=creeper_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=dolphin_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=donkey_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=drowned_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=elder_guardian_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=enderman_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=endermite_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=evoker_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=fox_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=ghast_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=guardian_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=hoglin_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=horse_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=husk_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=llama_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=magma_cube_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=mooshroom_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=mule_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=ocelot_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=panda_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=parrot_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=phantom_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=pig_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=piglin_brute_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=piglin_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=pillager_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=polar_bear_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=pufferfish_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=rabbit_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=ravager_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=salmon_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=sheep_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=shulker_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=silverfish_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=skeleton_horse_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=skeleton_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=slime_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=spider_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=squid_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=stray_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=strider_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=tropical_fish_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=turtle_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=vex_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=vindicator_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=villager_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=wandering_trader_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=witch_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=wither_skeleton_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=wolf_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=zoglin_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=zombie_horse_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=zombie_pigman_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=zombie_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=zombie_villager_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=axolotl_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=glow_squid_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=goat_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=allay_spawn_egg}] ~~~ function punishment/warning/ill_warning -execute @a[tag=!admin,scores={item_on=0},hasitem={item=warden_spawn_egg}] ~~~ function punishment/warning/ill_warning -#Non-survival item wipe -clear @a[tag=!admin,scores={item_on=0}] structure_void -clear @a[tag=!admin,scores={item_on=0}] structure_block -clear @a[tag=!admin,scores={item_on=0}] jigsaw -clear @a[tag=!admin,scores={item_on=0}] allow -clear @a[tag=!admin,scores={item_on=0}] deny -clear @a[tag=!admin,scores={item_on=0}] bedrock -clear @a[tag=!admin,scores={item_on=0}] command_block -clear @a[tag=!admin,scores={item_on=0}] repeating_command_block -clear @a[tag=!admin,scores={item_on=0}] chain_command_block -clear @a[tag=!admin,scores={item_on=0}] barrier -clear @a[tag=!admin,scores={item_on=0}] border_block -clear @a[tag=!admin,scores={item_on=0}] mob_spawner -clear @a[tag=!admin,scores={item_on=0}] command_block_minecart -clear @a[tag=!admin,scores={item_on=0}] end_portal_frame -#Type clear @a[tag=!admin,scores={item_on=0}] [item] [data] [value] for custom items -#Clear all spawn eggs(case sensetive) -clear @a[tag=!admin,scores={item_on=0}] spawn_egg -clear @a[tag=!admin,scores={item_on=0}] bat_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] bee_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] blaze_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] cat_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] cave_spider_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] chicken_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] cod_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] cow_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] creeper_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] dolphin_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] donkey_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] drowned_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] elder_guardian_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] enderman_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] endermite_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] evoker_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] fox_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] ghast_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] guardian_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] hoglin_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] horse_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] husk_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] llama_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] magma_cube_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] mooshroom_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] mule_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] ocelot_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] panda_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] parrot_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] phantom_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] pig_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] piglin_brute_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] piglin_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] pillager_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] polar_bear_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] pufferfish_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] rabbit_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] ravager_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] salmon_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] sheep_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] shulker_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] silverfish_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] skeleton_horse_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] skeleton_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] slime_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] spider_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] squid_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] stray_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] strider_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] tropical_fish_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] turtle_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] vex_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] vindicator_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] villager_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] wandering_trader_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] witch_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] wither_skeleton_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] wolf_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] zoglin_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] zombie_horse_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] zombie_pigman_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] zombie_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] zombie_villager_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] axolotl_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] glow_squid_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] goat_spawn_egg -clear @a[tag=!admin,scores={item_on=0}] spawn_egg 51 \ No newline at end of file diff --git a/Safeguard anti-cheat B/functions/assets/asset.mcfunction b/Safeguard anti-cheat B/functions/assets/asset.mcfunction index 83c2715..cd25445 100644 --- a/Safeguard anti-cheat B/functions/assets/asset.mcfunction +++ b/Safeguard anti-cheat B/functions/assets/asset.mcfunction @@ -30,12 +30,10 @@ scoreboard players add @a ill_warning 0 scoreboard players add @a cbe_warning 0 scoreboard players add @a gmc_warning 0 scoreboard players add @a grief_warning 0 -scoreboard players add @a 32k_on 0 -scoreboard players add @a 32k_off 0 +scoreboard players add @a kod_on 0 +scoreboard players add @a kod_off 0 scoreboard players add @a nocrash_on 0 scoreboard players add @a nocrash_off 0 -scoreboard players add @a nmspf_on 0 -scoreboard players add @a nmspf_off 0 #Welcomer toggle execute as @a[scores={welcome_off=0}, tag=admin] run scoreboard players set @a[tag=admin] welcome 0 execute as @a[scores={welcome_on=0}, tag=admin] run scoreboard players set @a[tag=admin] welcome 1 @@ -68,22 +66,14 @@ execute as @a[scores={death_coord_on=0}, tag=admin] run scoreboard players set @ #Death effect (still admin thing :) execute as @a[scores={death_effect_off=0}, tag=admin] run scoreboard players set @a[tag=admin] death_toggle 0 execute as @a[scores={death_effect=0}, tag=admin] run scoreboard players set @a[tag=admin] death_toggle 1 -#anti 32k (admin thinga majig) -execute as @a[scores={32k_off=0}, tag=admin] run scoreboard players set @a[tag=admin] 32k_toggle 0 -execute as @a[scores={32k_on=0}, tag=admin] run scoreboard players set @a[tag=admin] 32k_toggle 1 -#anti crasher (admin thingus) -execute as @a[scores={nocrash_off=0}, tag=admin] run scoreboard players set @a[tag=admin] nocrash_toggle 0 -execute as @a[scores={nocrash_on=0}, tag=admin] run scoreboard players set @a[tag=admin] nocrash_toggle 1 -#anti crasher (admin thingus) -execute as @a[scores={nmspf_off=0}, tag=admin] run scoreboard players set @a[tag=admin] nmspf_toggle 0 -execute as @a[scores={nmspf_on=0}, tag=admin] run scoreboard players set @a[tag=admin] nmspf_toggle 1 #Function execute tag @a[tag=ban1] add Ban execute as @a[scores={death_effect=0}] run execute as @e[type=lightning_bolt] run fill ~-2~-2~-2 ~2~2~2 air 0 replace fire #End lock -execute as @a[scores={end_lock=0}] if block ~~-2~ end_portal 0 run tp @p ~-1~1~ -execute as @a[scores={end_lock=0}] if block ~~-0.1~ end_portal 0 run tp @p ~-1~1~ -execute as @a[scores={end_lock=0}] if block ~~-0.01~ end_portal 0 run tp @p ~-1~1~ +execute at @a[scores={end_lock=0}] if block ~~-2~ end_portal 0 run tp @p ~-1~1~ +execute at @a[scores={end_lock=0}] if block ~~-0.1~ end_portal 0 run tp @p ~-1~1~ +execute at @a[scores={end_lock=0}] if block ~~-0.01~ end_portal 0 run tp @p ~-1~1~ +execute at @a[scores={end_lock=0}] if block ~~-1~ end_portal 0 run tellraw @p {"rawtext":[{"text":"§6[§eSafeGuard§6]§r The end was locked by an admin! Entering it will §4instant kill you§f."}]} execute as @a[scores={end_lock=0}] run kill @e[type=eye_of_ender_signal] #Shulker box/barrel ban(for anti kit) clear @a[scores={barrel_lock=0}] barrel @@ -101,17 +91,15 @@ execute as @a[scores={anti_lag=120}] run tellraw @a {"rawtext":[{"text":"§6[§e execute as @a[scores={anti_lag=140}] run tellraw @a {"rawtext":[{"text":"§6[§eSafeGuard§6]§r§l§a Ground items cleared in 3 seconds...§r"}]} execute as @a[scores={anti_lag=160}] run tellraw @a {"rawtext":[{"text":"§6[§eSafeGuard§6]§r§l§a Ground items cleared in 2 seconds...§r"}]} execute as @a[scores={anti_lag=180}] run tellraw @a {"rawtext":[{"text":"§6[§eSafeGuard§6]§r§l§a Ground items cleared in 1 seconds...§r"}]} -execute as @a[scores={anti_lag=180}] run gamerule domobloot true -execute as @a[scores={anti_lag=200}] run kill @e[type=arrow] -execute as @a[scores={anti_lag=200}] run kill @e[type=polar_bear] -execute as @a[scores={anti_lag=200}] run kill @e[type=minecraft:area_effect_cloud] -execute as @a[scores={anti_lag=200}] run kill @e[type=minecraft:fox] -execute as @a[scores={anti_lag=200}] run kill @e[type=minecraft:vex] +execute as @a[scores={anti_lag=200}] run tp @e[type=arrow] ~ -1000 ~ +execute as @a[scores={anti_lag=200}] run tp @e[type=polar_bear] ~ -1000 ~ +execute as @a[scores={anti_lag=200}] run tp @e[type=minecraft:area_effect_cloud] ~ -1000 ~ +execute as @a[scores={anti_lag=200}] run tp @e[type=minecraft:fox] ~ -1000 ~ +execute as @a[scores={anti_lag=200}] run tp @e[type=minecraft:vex] ~ -1000 ~ execute as @a[scores={anti_lag=200}] run kill @e[type=item] -execute as @a[scores={anti_lag=200}] run kill @e[family=monster] -execute as @a[scores={anti_lag=200}] run kill @e[type=xp_orb] +execute as @a[scores={anti_lag=200}] run tp @e[family=monster] ~ -1000 ~ +execute as @a[scores={anti_lag=200}] run tp @e[type=xp_orb] ~ -1000 ~ execute as @a[scores={anti_lag=200}] run tellraw @a {"rawtext":[{"text":"§6[§eSafeGuard§6]§r§l§a Lag cleared!§r"}]} -execute as @a[scores={anti_lag=200}] run gamerule domobloot true execute as @a[scores={anti_lag=200..}] run scoreboard players reset @a anti_lag #Warning Check scoreboard objectives add warn_check dummy diff --git a/Safeguard anti-cheat B/functions/assets/death_coords.mcfunction b/Safeguard anti-cheat B/functions/assets/death_coords.mcfunction deleted file mode 100644 index 9157f6d..0000000 --- a/Safeguard anti-cheat B/functions/assets/death_coords.mcfunction +++ /dev/null @@ -1,5 +0,0 @@ -#bridge-file-version: #8 -##execute @s[scores={death_coord_on=0}] ~~~ tellraw @s {"rawtext":[{"text":"§6[§eSafeGuard§6]§r §eYou died at the Coordinates on the next line"}]} -execute as @a[scores={death_coord_on=0}] run gamerule doimmediaterespawn true -execute as @a[scores={death_coord_off=0}] run gamerule doimmediaterespawn false -execute as @s[scores={death_coord_on=0}] run tag @s add death_coord \ No newline at end of file diff --git a/Safeguard anti-cheat B/functions/assets/illegal_item.mcfunction b/Safeguard anti-cheat B/functions/assets/illegal_item.mcfunction deleted file mode 100644 index 3a22424..0000000 --- a/Safeguard anti-cheat B/functions/assets/illegal_item.mcfunction +++ /dev/null @@ -1,3 +0,0 @@ -#bridge-file-version: #5 -replaceitem entity @s slot.weapon.mainhand 0 air -tellraw @a {"rawtext":[{"text":"§6[§eSafeGuard§6]§r§c§l "},{"selector":"@s"},{"text":" §r§4Was detected having an §l§cILLEGAL ITEM!§r"}]} \ No newline at end of file diff --git a/Safeguard anti-cheat B/functions/credit.mcfunction b/Safeguard anti-cheat B/functions/credit.mcfunction index 16c41bc..ba00450 100644 --- a/Safeguard anti-cheat B/functions/credit.mcfunction +++ b/Safeguard anti-cheat B/functions/credit.mcfunction @@ -8,4 +8,4 @@ tellraw @s {"rawtext":[{"text":"\n"}]} tellraw @s {"rawtext":[{"text":"§l§a Help"}]} tellraw @s {"rawtext":[{"text":"§l§6----------------------------------------------------------§r"}]} tellraw @s {"rawtext":[{"text":"Blazer#9677 - Join the disord for any help nGu5gehXs3"}]} -tellraw @s {"rawtext":[{"text":"Version 1.6"}]} \ No newline at end of file +tellraw @s {"rawtext":[{"text":"Version 1.7.2"}]} \ No newline at end of file diff --git a/Safeguard anti-cheat B/functions/punishment/ban/ban.mcfunction b/Safeguard anti-cheat B/functions/punishment/ban/ban.mcfunction deleted file mode 100644 index 5133632..0000000 --- a/Safeguard anti-cheat B/functions/punishment/ban/ban.mcfunction +++ /dev/null @@ -1,9 +0,0 @@ -#bridge-file-version: #17 -tellraw @s {"rawtext":[{"text":"§6[§eSafeGuard§6]§r§c§l "},{"text":"ERROR: §r§4This function shouldn't be ran manually§r"}]} -scoreboard players add @a[tag=ban,tag=!admin] banned 1 -tag @a[scores={banned=100..}] add Ban -execute @a[scores={banned=10}] ~~~ function assets/boom -execute @a[scores={banned=0..}] ~~~ tp @s ~ 1000 ~ -execute @a[scores={banned=99}] ~~~ tellraw @a {"rawtext":[{"text":"§6[§eSafeGuard§6]§r§c§l "},{"selector":"@s"},{"text":"§r got banned!"}]} -execute @a[scores={banned=1}] ~~~ tag @s remove admin -execute @a[tag=Ban] ~~~ tag @s remove admin \ No newline at end of file diff --git a/Safeguard anti-cheat B/functions/punishment/freeze/Script Testing/manifest.json b/Safeguard anti-cheat B/functions/punishment/freeze/Script Testing/manifest.json new file mode 100644 index 0000000..a82071a --- /dev/null +++ b/Safeguard anti-cheat B/functions/punishment/freeze/Script Testing/manifest.json @@ -0,0 +1,59 @@ +{ + "format_version": 2, + "header": { + "name": "Script Testing", + "description": "Beta API §cREQUIRED", + "uuid": "afaec5e8-41df-4c83-953c-d72d6d5096ca", + "min_engine_version": [ + 1, + 19, + 40 + ], + "version": [ + 1, + 0, + 0 + ] + }, + "modules": [ + { + "description": "Behavior Pack Module", + "type": "data", + "uuid": "112589f1-110e-430a-aa87-b87445ddd347", + "version": [ + 1, + 0, + 0 + ] + }, + { + "description": "Gametest Module", + "type": "script", + "language": "javascript", + "entry": "scripts/main.js", + "uuid": "ea607914-520e-4836-8b05-54d40c1cab28", + "version": [ + 1, + 0, + 0 + ] + } + ], + "dependencies": [ + { + "module_name": "@minecraft/server", + "version": "1.1.0-beta" + }, + { + "module_name": "@minecraft/server-ui", + "version": "1.0.0-beta" + } + ], + "metadata": { + "generated_with": { + "bridge": [ + "1.8.4" + ] + } + } +} \ No newline at end of file diff --git a/Safeguard anti-cheat B/functions/punishment/freeze/Script Testing/pack_icon.png b/Safeguard anti-cheat B/functions/punishment/freeze/Script Testing/pack_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..6a44058ff90e703eac2dbb68360bd7610d992e52 GIT binary patch literal 14054 zcmeIZc{~)}_dl*wiVP~021!x&7>r%UzRSL6-Zq{{8#=z?ViDxB9<)HKir}?)uX(GRsGqk+*u`Gkt354|2XQU zxHnS7(iERuBFsonz|mSLHdG=fS*or`w!cZ?*PzPWkV;pLd`YJC zYm|hCvxvU7fSA}LT}=U`gK%!LRLdv1+Ctfc2uW9aVX4Qw7AEjuU$N{YsijfXmU6lH za0xpLI6{h-Uw}vZ3BRAa=!Zn9Z}keRkA49@K~F{KbOfhm&x(L zcm&}*@1iAp>J-*+s!eFw;tYhOB(ImNNO`vO^f%?FMuIlx@Q+DSFc{Blzw+{!DmqIV z#?RwmB@`MUCMm%?(5x^&tYTsySe7ll@?G^umy)mgF63QM9#yk9R7mD8Xc; z`Si2}Y6@jbv!r8QNd)_eHI&Fsd{vT{<&#G6Iob#b2|bdN)Q5%S65uPka41F;ddcO~lhh#LiNvI72!)Msjo3`}km~TBg<=ApVN0yuKR| z5u}CibFSvK!wL}*U$TPqV=Zr!mC4;;>g~qU4L>e()|Vj<2GuzOL=C zzu-4{7xDmO98@*2Dlu)Lc8r=97Td-7)dvKYCszHUKuYR+EY`1a`zA3NGjEV5HG>oq#? zmWl)&*2<>3;BNlY^p+0)mS9?)t^232VBNMEKZmrfqSpp)(#+M^%zBF);!(&)R2blk8O%ZwBfQn!dXSF-dp` zsrMX-7~*wvC~3|FHrw8ga+>;YHiykn!K?U^VK)w?( zDN-0t(6y5w4Fk%&fkRE(CpjZmmcE!=2?Y}oaM;zsCr>=_S8%Bxfb$ZVAe*IwibI|& zu^5Sq2xtS_V<;pI9rDq+!vmLX4k-3xTf4|AAtYR5;?$(b_3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n8$yg{S z#Lp;}Z7ko_Up2PW_`Nc9r}#k_BJqG@Z1(-z*M`4*FCO4Z+|WCpgR67x(GkIL%fgws zE$89WL7ajA%b1LUH2KMFR_fo!J)l5EO@4n=qDHaf{~;`+r5N{~R`gfad{engrZF`> zt`;*rh)93gm_1!5#V{vG6MOpx7;L=OI5Ij#hxYjp?ni-|k4Osn)P3V;-h%UAglj zuKbnq#1T1Xb6gnWL9igl-(#B4Dz&Akul7G`T+DU-Zcg~6Cz`0YF}*hy=Uh5WQDXGh zb8xrn)Aq{U)EV3y-W~fy772e{nua5$vp>g{wc1bBr+0_#~b8i$4^>=C{aJ1h4LhIS#JdeeaKU+?#Pet8(yUu z7z!$h@3ymPV|saejJt#LFwa9&m;Kq=7xIYxTjQ*GYlYM-&*5#z&;4%AL@j?+*X$ns z9@sDX5WuxOg^mb{?n|IT>2=V%&EGtZ`;|Esda>5lPD}S_w(E=0%lY;Gd3)`yI}j?5 z2~U467Yun#V4{w?_@?TV_j3p$(AsFzk&gRuX#~8@#o;8=zA#y2Hn(ztWZcW8uH> z6|5($TV!urB@D1*qj{`LRj22YjIM9I-I3``+tSB1S5ToEDwBor*@G-k?-u6K z28AOYN7Y#!eCl*IE@rI6E}mf5N>40{ZcKCZn2zs*F^NCX|e6FBJK*-hyy<}4H zV{@ogVqx#|b=uyPh23a#yt>vJrg7zY>uS)(rV@^`{!hyez2Iae;*f;f5bNA3SRLRq ziK-G`A)N}pY$cV{CwH2)wjqJrDIlL9ANS8*7ICiHkPxW~a@}MybgWssKCCwFvvkYG zlf9*LER6U$_^0`QU-J0>{H9Cp=?VIj_&NX4^y%Sgz@M$8pomCv@XZ|}1sPT8QmLme F{~rkVbLap7 literal 0 HcmV?d00001 diff --git a/Safeguard anti-cheat B/functions/punishment/freeze/Script Testing/scripts/index.js b/Safeguard anti-cheat B/functions/punishment/freeze/Script Testing/scripts/index.js new file mode 100644 index 0000000..215cb15 --- /dev/null +++ b/Safeguard anti-cheat B/functions/punishment/freeze/Script Testing/scripts/index.js @@ -0,0 +1,26 @@ +import * as ui from "mojang-minecraft-ui" +import { world } from "mojang-minecraft" + +//Form Creation +let form1 = new ui.ActionFormData() +form1.title("Tutorial") +form1.body("Tutorial Body") +//start at 0 +form1.button("Creative mode") + +world.events.beforeItemUse.subscribe(eventdata => { + let player = eventdata.source + let item = eventdata.item + + if (item.id == "minecraft:compass") { + form1.show(player).then(result => { + let selection = result.selection + if (selection == 0) { + player.runcommand( + "gamemode c @s" + ) + } + } + // @ts-ignore + } +}) \ No newline at end of file diff --git a/Safeguard anti-cheat B/functions/punishment/freeze/Script Testing/scripts/misc/afkDetection.js b/Safeguard anti-cheat B/functions/punishment/freeze/Script Testing/scripts/misc/afkDetection.js new file mode 100644 index 0000000..fd44708 --- /dev/null +++ b/Safeguard anti-cheat B/functions/punishment/freeze/Script Testing/scripts/misc/afkDetection.js @@ -0,0 +1,76 @@ +import { world } from '@minecraft/server'; +world.events.tick.subscribe(() => { + [...world.getPlayers()].forEach(player => { + if(player.hasTag("admin")) return; + else{ + player.runCommandAsync(`scoreboard players add @s afkTimer 1`); + const afkTimer = world.scoreboard.getObjective('afkTimer').getScore(player.scoreboard); + if(afkTimer > 5300){ + if(afkTimer == 5400) player.tell(`§6[§eSafeGuard§6] §l§4YOU WILL BE KICKED FOR AFK IN §c30§4 SECONDS!`); + else if(afkTimer == 5700) player.tell(`§6[§eSafeGuard§6] §l§4YOU WILL BE KICKED FOR AFK IN §c15§4 SECONDS!`); + else if(afkTimer == 5800) player.tell(`§6[§eSafeGuard§6] §l§4YOU WILL BE KICKED FOR AFK IN §c10§4 SECONDS!`); + else if(afkTimer == 5900) player.tell(`§6[§eSafeGuard§6] §l§4YOU WILL BE KICKED FOR AFK IN §c5§4 SECONDS!`); + else if(afkTimer == 5920) player.tell(`§6[§eSafeGuard§6] §l§4YOU WILL BE KICKED FOR AFK IN §c4§4 SECONDS!`); + else if(afkTimer == 5940) player.tell(`§6[§eSafeGuard§6] §l§4YOU WILL BE KICKED FOR AFK IN §c3§4 SECONDS!`); + else if(afkTimer == 5960) player.tell(`§6[§eSafeGuard§6] §l§4YOU WILL BE KICKED FOR AFK IN §c2§4 SECONDS!`); + else if(afkTimer == 5980) player.tell(`§6[§eSafeGuard§6] §l§4YOU WILL BE KICKED FOR AFK IN §c1§4 SECOND!`); + else if(afkTimer > 6000){ + stillHere(player); + player.runCommandAsync(`kick ${player.nameTag} §l§4Kicked for being §cAFK §4 || §c${new Date()}`); + world.say(`§6[§eSafeGuard Notify§6]§5§l §r§5${player.nameTag}§b Was kicked for being AFK§r`) + } + } + const {x, y, z} = player.velocity; + if(x > .15 || y > .43 || z > .15){ + stillHere(player); + } + + } + } +)}); + +world.events.playerJoin.subscribe(join => { + const player = join.player; + stillHere(player); + + }); + + +world.events.beforeItemUseOn.subscribe((data) => { + let {item} = data; + const player = data.source; + if (item) { + stillHere(player); + } +}); + +world.events.blockBreak.subscribe((data) => { + const player = data.player; + stillHere(player); +}); + + +world.events.beforeChat.subscribe((data) => { + const player = data.player; + stillHere(player); +}); + +world.events.entityHurt.subscribe((data) => { + + const damaged = data.hurtEntity; + const damager = data.damagingEntity; + + if(damager.typeId == "minecraft:player" && damaged.typeId == "minecraft:player" && damaged.getComponent("health").current <= 0){ + damager.runCommandAsync(`scoreboard players add @s kills 1`); + } + else if(damager.typeId == "minecraft:player"){ + stillHere(damager); + } +}); + + + + +function stillHere(player){ + player.runCommandAsync(`scoreboard players set @s afkTimer 1`); +} \ No newline at end of file diff --git a/Safeguard anti-cheat B/functions/punishment/freeze/Script Testing/scripts/misc/chestLock.js b/Safeguard anti-cheat B/functions/punishment/freeze/Script Testing/scripts/misc/chestLock.js new file mode 100644 index 0000000..5f98a60 --- /dev/null +++ b/Safeguard anti-cheat B/functions/punishment/freeze/Script Testing/scripts/misc/chestLock.js @@ -0,0 +1,22 @@ +import { EntityInventoryComponent, Items, ItemStack, MinecraftBlockTypes, MinecraftItemTypes, Player, world } from '@minecraft/server'; + +world.events.beforeItemUseOn.subscribe((event) => { + const player = event.source; + if (!(player instanceof Player)) return; + const block = player.dimension.getBlock( event.blockLocation ); + if(block.typeId == "minecraft:chest"){ + const inv = block.getComponent("minecraft:inventory").container; + const item = inv.getItem(0); + if(!item) return; + const itemName = item.nameTag ?? ''; + if(itemName.startsWith("chestOwner:")){ + if(itemName == `chestOwner:${player.nameTag}`){ + return; + } + else{ + event.cancel = true; + player.onScreenDisplay.setActionBar('§4§lChest is locked!'); + } + } +} +}); \ No newline at end of file diff --git a/Safeguard anti-cheat B/functions/punishment/freeze/Script Testing/scripts/misc/combatlogging.js b/Safeguard anti-cheat B/functions/punishment/freeze/Script Testing/scripts/misc/combatlogging.js new file mode 100644 index 0000000..a0fd580 --- /dev/null +++ b/Safeguard anti-cheat B/functions/punishment/freeze/Script Testing/scripts/misc/combatlogging.js @@ -0,0 +1,42 @@ +import { MinecraftEnchantmentTypes, EnchantmentList, world, EntityInventoryComponent , Player, ItemStack, MinecraftItemTypes, Items } from '@minecraft/server'; +const overworld = world.getDimension("overworld"); +world.events.entityHurt.subscribe((data) => { + try{ + const damaged = data.hurtEntity; + const damager = data.damagingEntity; + let inCombat = world.scoreboard.getObjective('in_combat').getScore(damager.scoreboard); + + const damagedHP = damaged.getComponent("health").current; + const damagerHP = damager.getComponent("health").current; + //if(player.typeId !== "minecraft:player" || damager.typeId !== "minecraft:player") return; + //damagedHP.runCommandAsync(`scoreboard players set @s in_combat 1200`); + if(!damager.typeId == "minecraft:player") return; + else{ + if(inCombat == 0){ + damager.tell(`now in combat!`); + } + damager.runCommandAsync(`scoreboard players set @s in_combat 1200`); + + } +}catch (error) {world.say("§l§4ERROR: §r"+ error)} +}); + + +world.events.tick.subscribe(() => { + [...world.getPlayers()].forEach(player => { + let plrName = player.name; + let inCombat = world.scoreboard.getObjective('in_combat').getScore(player.scoreboard); + player.runCommandAsync("scoreboard players remove @a[scores={in_combat=1..}] in_combat 1"); + if(inCombat == 1){ + player.tell("now out of combat!"); + } + }); +}); +world.events.playerJoin.subscribe(join => { + const player = join.player; + const inCombat = world.scoreboard.getObjective("in_combat").getScore(player.scoreboard); + if(inCombat > 1){ + world.say(player.name); + } + + }); \ No newline at end of file diff --git a/Safeguard anti-cheat B/functions/punishment/freeze/freeze.mcfunction b/Safeguard anti-cheat B/functions/punishment/freeze/freeze.mcfunction index 243504f..25351bc 100644 --- a/Safeguard anti-cheat B/functions/punishment/freeze/freeze.mcfunction +++ b/Safeguard anti-cheat B/functions/punishment/freeze/freeze.mcfunction @@ -1,6 +1,6 @@ #bridge-file-version: #10 tellraw @s {"rawtext":[{"text":"§6[§eSafeGuard§6]§r§c§l "},{"text":"ERROR: §r§4This function shouldn't be ran manually§r"}]} title @a[tag=freeze] times 1 1 1 -execute as @a[tag=freeze] run tp @s[tag=freeze] ~ ~ ~ facing @s +execute at @a[tag=freeze] run tp @s[tag=freeze] ~ ~ ~ facing @s effect @a[tag=freeze] slowness 100 100 true title @a[tag=freeze] actionbar §b§lYou are freezed.§r \ No newline at end of file diff --git a/Safeguard anti-cheat B/functions/punishment/softban/softunban.mcfunction b/Safeguard anti-cheat B/functions/punishment/softban/softunban.mcfunction index 62e7ad5..176fe87 100644 --- a/Safeguard anti-cheat B/functions/punishment/softban/softunban.mcfunction +++ b/Safeguard anti-cheat B/functions/punishment/softban/softunban.mcfunction @@ -8,7 +8,7 @@ tag @a[tag=softunban] remove softban_hour gamemode survival @a[tag=softunban] effect @a[tag=softunban] clear tellraw @a[tag=softunban] {"rawtext":[{"text":"§6[§eSafeGuard§6] §aSoftban was removed!!"}]} -execute as @a[tag=softunban] run tp @p[tag=softunban] ~ 140 ~ +execute as @a[tag=softunban] run tp @p[tag=softunban] ~ 300 ~ effect @a[tag=softunban] slow_falling 60 0 true execute as @a[tag=softunban] run tellraw @a[tag=admin,scores={notify=1}] {"rawtext":[{"text":"§6[§eSafeGuard Notify§6]§5§l "},{"selector":"@a[tag=softunban]"},{"text":" §bwas softunbanned! §r"}]} scoreboard players reset @a[tag=softunban,scores={softfive=1..}] softfive diff --git a/Safeguard anti-cheat B/functions/settings/32k.mcfunction b/Safeguard anti-cheat B/functions/settings/32k.mcfunction deleted file mode 100644 index 1c088ef..0000000 --- a/Safeguard anti-cheat B/functions/settings/32k.mcfunction +++ /dev/null @@ -1,16 +0,0 @@ -#Toggle a32k -scoreboard players add @s[tag=admin] 32k_toggle 1 -scoreboard players set @s[tag=admin,scores={32k_toggle=2..}] 32k_toggle 0 -tellraw @s[tag=admin,scores={32k_toggle=0}] {"rawtext":[{"text":"§6[§eSafeGuard§6]§b Anti 32k §l§5turned off! §r"}]} -execute as @s[tag=admin,scores={32k_toggle=0}] run scoreboard objectives remove 32k_on -execute as @s[tag=admin,scores={32k_toggle=0}] run scoreboard objectives add 32k_off dummy -tellraw @s[tag=admin,scores={32k_toggle=1}] {"rawtext":[{"text":"§6[§eSafeGuard§6]§b Anti 32k §l§5turned on! §r"}]} -execute as @s[tag=admin,scores={32k_toggle=1}] run scoreboard objectives add 32k_on dummy -execute as @s[tag=admin,scores={32k_toggle=1}] run scoreboard objectives remove 32k_off -playsound note.bass @s[tag=admin] ~~~ -#deny -tellraw @s[tag=!admin] {"rawtext":[{"text":"§6[§eSafeGuard§6]§r §4You need admin tag to run this!§r"}]} -playsound random.anvil_land @s[tag=!admin] -#Notify people who turned it on -execute as @s[scores={32k_toggle=1}] run tellraw @a[tag=admin,scores={notify=1}] {"rawtext":[{"text":"§6[§eSafeGuard Notify§6]§5§l "},{"selector":"@s[scores={32k_toggle=1}]"},{"text":" §bturned on§l§5 Anti 32k! §r"}]} -execute as @s[scores={32k_toggle=0}] run tellraw @a[tag=admin,scores={notify=1}] {"rawtext":[{"text":"§6[§eSafeGuard Notify§6]§5§l "},{"selector":"@s[scores={32k_toggle=0}]"},{"text":" §bturned off§l§5 Anti 32k! §r"}]} \ No newline at end of file diff --git a/Safeguard anti-cheat B/functions/settings/crasher.mcfunction b/Safeguard anti-cheat B/functions/settings/crasher.mcfunction deleted file mode 100644 index 46206db..0000000 --- a/Safeguard anti-cheat B/functions/settings/crasher.mcfunction +++ /dev/null @@ -1,16 +0,0 @@ -#Toggle Anti Crasher -scoreboard players add @s[tag=admin] nocrash_toggle 1 -scoreboard players set @s[tag=admin,scores={nocrash_toggle=2..}] nocrash_toggle 0 -tellraw @s[tag=admin,scores={nocrash_toggle=0}] {"rawtext":[{"text":"§6[§eSafeGuard§6]§b Anti Crasher §l§5turned off! §r"}]} -execute as @s[tag=admin,scores={nocrash_toggle=0}] run scoreboard objectives remove nocrash_on -execute as @s[tag=admin,scores={nocrash_toggle=0}] run scoreboard objectives add nocrash_off dummy -tellraw @s[tag=admin,scores={nocrash_toggle=1}] {"rawtext":[{"text":"§6[§eSafeGuard§6]§b Anti Crasher §l§5turned on! §r"}]} -execute as @s[tag=admin,scores={nocrash_toggle=1}] run scoreboard objectives add nocrash_on dummy -execute as @s[tag=admin,scores={nocrash_toggle=1}] run scoreboard objectives remove nocrash_off -playsound note.bass @s[tag=admin] ~~~ -#deny -tellraw @s[tag=!admin] {"rawtext":[{"text":"§6[§eSafeGuard§6]§r §4You need admin tag to run this!§r"}]} -playsound random.anvil_land @s[tag=!admin] -#Notify people who turned it on -execute as @s[scores={nocrash_toggle=1}] run tellraw @a[tag=admin,scores={notify=1}] {"rawtext":[{"text":"§6[§eSafeGuard Notify§6]§5§l "},{"selector":"@s[scores={nocrash_toggle=1}]"},{"text":" §bturned on§l§5 Anti Crasher! §r"}]} -execute as @s[scores={nocrash_toggle=0}] run tellraw @a[tag=admin,scores={notify=1}] {"rawtext":[{"text":"§6[§eSafeGuard Notify§6]§5§l "},{"selector":"@s[scores={nocrash_toggle=0}]"},{"text":" §bturned off§l§5 Anti Crasher! §r"}]} \ No newline at end of file diff --git a/Safeguard anti-cheat B/functions/settings/lock_end.mcfunction b/Safeguard anti-cheat B/functions/settings/lock_end.mcfunction index 218960a..91f19a8 100644 --- a/Safeguard anti-cheat B/functions/settings/lock_end.mcfunction +++ b/Safeguard anti-cheat B/functions/settings/lock_end.mcfunction @@ -14,5 +14,5 @@ playsound note.bass @s[tag=admin] ~~~ tellraw @s[tag=!admin] {"rawtext":[{"text":"§6[§eSafeGuard§6]§r §4You need admin tag to run this!§r"}]} playsound random.anvil_land @s[tag=!admin] #Notify -execute as @s[scores={endnether_toggle=0}] run tellraw @a[tag=admin,scores={notify=1}] {"rawtext":[{"text":"§6[§eSafeGuard Notify§6]§5§l "},{"selector":"@s[scores={endnether_toggle=1}]"},{"text":" §bturned on§l§5 End Lock! §r"}]} -execute as @s[scores={endnether_toggle=1}] run tellraw @a[tag=admin,scores={notify=1}] {"rawtext":[{"text":"§6[§eSafeGuard Notify§6]§5§l "},{"selector":"@s[scores={endnether_toggle=0}]"},{"text":" §bturned off§l§5 End Lock! §r"}]} \ No newline at end of file +execute as @s[scores={endnether_toggle=0}] run tellraw @a[tag=admin,scores={notify=1}] {"rawtext":[{"text":"§6[§eSafeGuard Notify§6]§5§l "},{"selector":"@s[scores={endnether_toggle=1}]"},{"text":" §bturned off§l§5 End Lock! §r"}]} +execute as @s[scores={endnether_toggle=1}] run tellraw @a[tag=admin,scores={notify=1}] {"rawtext":[{"text":"§6[§eSafeGuard Notify§6]§5§l "},{"selector":"@s[scores={endnether_toggle=0}]"},{"text":" §bturned on§l§5 End Lock! §r"}]} \ No newline at end of file diff --git a/Safeguard anti-cheat B/functions/settings/namespoof.mcfunction b/Safeguard anti-cheat B/functions/settings/namespoof.mcfunction deleted file mode 100644 index 39cc6c0..0000000 --- a/Safeguard anti-cheat B/functions/settings/namespoof.mcfunction +++ /dev/null @@ -1,16 +0,0 @@ -#Toggle Anti Namespoof -scoreboard players add @s[tag=admin] nmspf_toggle 1 -scoreboard players set @s[tag=admin,scores={nmspf_toggle=2..}] nmspf_toggle 0 -tellraw @s[tag=admin,scores={nmspf_toggle=0}] {"rawtext":[{"text":"§6[§eSafeGuard§6]§b Anti Namespoof §l§5turned off! §r"}]} -execute as @s[tag=admin,scores={nmspf_toggle=0}] run scoreboard objectives remove nmspf_on -execute as @s[tag=admin,scores={nmspf_toggle=0}] run scoreboard objectives add nmspf_off dummy -tellraw @s[tag=admin,scores={nmspf_toggle=1}] {"rawtext":[{"text":"§6[§eSafeGuard§6]§b Anti Namespoof §l§5turned on! §r"}]} -execute as @s[tag=admin,scores={nmspf_toggle=1}] run scoreboard objectives add nmspf_on dummy -execute as @s[tag=admin,scores={nmspf_toggle=1}] run scoreboard objectives remove nmspf_off -playsound note.bass @s[tag=admin] ~~~ -#deny -tellraw @s[tag=!admin] {"rawtext":[{"text":"§6[§eSafeGuard§6]§r §4You need admin tag to run this!§r"}]} -playsound random.anvil_land @s[tag=!admin] -#Notify people who turned it on -execute as @s[scores={nmspf_toggle=1}] run tellraw @a[tag=admin,scores={notify=1}] {"rawtext":[{"text":"§6[§eSafeGuard Notify§6]§5§l "},{"selector":"@s[scores={nmspf_toggle=1}]"},{"text":" §bturned on§l§5 Anti Namespoof! §r"}]} -execute as @s[scores={nmspf_toggle=0}] run tellraw @a[tag=admin,scores={notify=1}] {"rawtext":[{"text":"§6[§eSafeGuard Notify§6]§5§l "},{"selector":"@s[scores={nmspf_toggle=0}]"},{"text":" §bturned off§l§5 Anti Namespoof! §r"}]} \ No newline at end of file diff --git a/Safeguard anti-cheat B/functions/setup/setup.mcfunction b/Safeguard anti-cheat B/functions/setup/setup.mcfunction index 6649f99..cc06905 100644 --- a/Safeguard anti-cheat B/functions/setup/setup.mcfunction +++ b/Safeguard anti-cheat B/functions/setup/setup.mcfunction @@ -1,4 +1,3 @@ -#scoreboard scoreboard objectives add vanish dummy scoreboard objectives add welcomer dummy scoreboard objectives add endnether_toggle dummy @@ -16,9 +15,11 @@ scoreboard objectives add setup_success dummy scoreboard objectives add banned dummy scoreboard objectives add ac_banned dummy scoreboard objectives add 32k_toggle dummy +scoreboard objectives add kod_toggle dummy scoreboard objectives add nocrash_toggle dummy scoreboard objectives add nmspf_toggle dummy scoreboard players add @a setup_success 0 +event entity @s safeguard:setup #warning scoreboard setup scoreboard objectives add ill_warning dummy scoreboard objectives add gmc_warning dummy diff --git a/Safeguard anti-cheat B/manifest.json b/Safeguard anti-cheat B/manifest.json index 25751e3..816afbc 100644 --- a/Safeguard anti-cheat B/manifest.json +++ b/Safeguard anti-cheat B/manifest.json @@ -1,67 +1,52 @@ { "format_version": 2, "header": { - "name": "§l§eSafe§6Guard §fAntiCheat", - "description": "§l§fMade by §eBlazer#9677 §6V1.5", + "name": "§l§eSafe§6Guard §fAntiCheat §4DEV BUILD§r", + "description": "§l§fMade by §eBlazer#9677 §fV1.6.2\nBeta API §cREQUIRED", "uuid": "82b3037f-a80a-49e1-88b8-941479b49a40", - "version": [ + "min_engine_version": [ 1, - 0, - 0 + 19, + 50 ], - "min_engine_version": [ + "version": [ 1, - 17, - 0 + 7, + 2 ] }, "modules": [ { + "description": "Behavior Pack Module", "type": "data", - "uuid": "4c37083f-ff85-6931-bf36-345361c338f8", + "uuid": "cd2cd41a-1849-410e-8f0a-5d30fde4bd9a", "version": [ 1, - 1, - 7 + 0, + 0 ] }, { - "description": "Gametest Framework", - "language": "javascript", + "description": "Gametest Module", "type": "script", - "uuid": "21c183fe-0c37-11ec-82a8-0242ac130003", + "language": "javascript", + "entry": "scripts/index.js", + "uuid": "f626740d-50a6-49f1-a24a-834983b72134", "version": [ + 1, 0, - 0, - 1 - ], - "entry": "scripts/example/index.js" + 0 + ] } ], "dependencies": [ { - "uuid": "b26a4d4c-afdf-4690-88f8-931846312678", - "version": [ - 0, - 1, - 0 - ] - }, - { - "uuid": "6f4b6893-1bb6-42fd-b458-7fa3d0c89616", - "version": [ - 0, - 1, - 0 - ] + "module_name": "@minecraft/server", + "version": "1.3.0-beta" }, { - "uuid": "2bd50a27-ab5f-4f40-a596-3641627c635e", - "version": [ - 0, - 1, - 0 - ] + "module_name": "@minecraft/server-ui", + "version": "1.1.0-beta" } ], "metadata": { @@ -71,4 +56,4 @@ ] } } -} +} \ No newline at end of file diff --git a/Safeguard anti-cheat B/scripts/config.js b/Safeguard anti-cheat B/scripts/config.js new file mode 100644 index 0000000..6414551 --- /dev/null +++ b/Safeguard anti-cheat B/scripts/config.js @@ -0,0 +1,15 @@ +//Edit items in this file if you want customization: + +//items flagged by anti-items add an item: +export const bannedItems = ['minecraft:allow', 'minecraft:command_block', 'minecraft:repeating_command_block', 'minecraft:chain_command_block', 'minecraft:border_block', 'minecraft:mob_spawner', 'minecraft:command_block_minecart','minecraft:flowing_lava', 'minecraft:lava', 'minecraft:flowing_water', 'minecraft:water', 'minecraft:lit_redstone_lamp', 'minecraft:pistonarmcollision', 'minecraft:tripwire', 'minecraft:unpowered_comparator', 'minecraft:powered_comparator', 'minecraft:fire', 'minecraft:lit_furnace', 'minecraft:lit_redstone_ore', 'minecraft:unlit_redstone_torch', 'minecraft:portal','minecraft:structure_block', 'minecraft:powered_repeater', 'minecraft:invisiblebedrock','minecraft:bedrock', 'minecraft:wgateway', 'minecraft:end_portal', 'minecraft:end_portal_frame', 'minecraft:structure_void', 'minecraft:chalkboard', 'minecraft:bubble_column', 'minecraft:lit_smoker', 'minecraft:lava_cauldron', 'minecraft:jigsaw', 'minecraft:lit_blast_furnace', 'minecraft:light_block', 'minecraft:stickypistonarmcollision', 'minecraft:soul_fire', 'minecraft:lit_deepslate_redstone_ore', 'minecraft:camera', 'minecraft:deny', 'minecraft:barrier', 'minecraft:glowingobsidian', 'minecraft:glow_stick', 'minecraft:netherreactor', 'minecraft:info_update'] + +//items flagged by cbe (do not change unless you know what you're doing) +export const cbeItems = ["minecraft:dispenser","minecraft:movingblock", "minecraft:moving_block", "minecraft:beehive", "minecraft:bee_nest", 'minecraft:cod_bucket', 'minecraft:salmon_bucket', 'minecraft:tropical_fish_bucket', 'minecraft:pufferfish_bucket', 'minecraft:axolotl_bucket', 'minecraft:tadpole_bucket']; + +//items that were found with these words in the name or lore will get cleared and player will get flagged (you can also include symbols) +//you can also remove all keywords if you don't want custom keyword detection +export const bannedKeyWords = ["horion","32k","nbt","hack","nested","cbe","nuker","illegal"]; + +//change prefix of commands +export const prefix = "!"; + diff --git a/Safeguard anti-cheat B/scripts/index.js b/Safeguard anti-cheat B/scripts/index.js index 9291dfa..f8b13b6 100644 --- a/Safeguard anti-cheat B/scripts/index.js +++ b/Safeguard anti-cheat B/scripts/index.js @@ -1,245 +1,240 @@ -import { MinecraftEnchantmentTypes, EnchantmentList, world, EntityInventoryComponent , Player, ItemStack, MinecraftItemTypes, Items } from '@minecraft/server'; -world.events.beforeChat.subscribe((data) => { - const player = data.sender; - const sender = data.sender.name; - //change prefix of commands - const prefix = "?"; -//muted -if(player.hasTag('muted') || player.hasTag('Ban')){ - player.tell('§6[§eSafeGuard§6]§r§c You are muted!') - data.cancel = true; -} -//info command -else if (data.message.startsWith(prefix + "help", 0) == true || data.message.startsWith("!help", 0) == true) { - if(player.hasTag('admin')){ - player.tell(`§l§aPREFIX:§2 §r${prefix}\n§l§aCOMMANDS:\n§r§eban §r|| to ban a person || ban Steve\n§einvsee §r|| see inventory of a player\n§emute §r|| mute a player || mute Steve\n§eunmute §r || unmute a player || unmute Steve`); - data.cancel = true;} - else{ - player.tell('§6[§eSafeGuard§6]§r§c§l You need admin tag to run this!') - data.cancel = true;} -} -//ban cmd - else if (data.message.startsWith(prefix + "ban", 0) == true) { - if(player.hasTag('admin')){ - var setName = data.message.replace(prefix + "ban ", ""); - setName.replaceAll(/'"'/g, ""); - player.runCommand('tag "' + setName +'" add Ban'); - player.runCommand(`tellraw @a[tag=admin,scores={notify=1}] {"rawtext":[{"text":"§6[§eSafeGuard Notify§6]§5§l "},{"text":"${sender} §bbanned§l§5 ${setName}! §r"}]}`); - data.cancel = true;} - else{ - player.tell('§6[§eSafeGuard§6]§r§c§l You need admin tag to run this!') - data.cancel = true;} - } +import * as Minecraft from '@minecraft/server'; +import * as config from "./config.js"; + +console.warn("Script Loaded"); +const world = Minecraft.world; -//mute cmd -else if (data.message.startsWith(prefix + "mute", 0) == true) { - if(player.hasTag('admin')){ - var setName = data.message.replace(prefix + "mute ", ""); - setName.replaceAll(/'"'/g, ""); - player.runCommand('tag "' + setName +'" add muted'); - player.runCommand(`tellraw @a[tag=admin,scores={notify=1}] {"rawtext":[{"text":"§6[§eSafeGuard Notify§6]§5§l "},{"text":"${sender} §bmuted§l§5 ${setName}! §r"}]}`); - data.cancel = true;} - else{ - player.tell('§6[§eSafeGuard§6]§r§c§l You need admin tag to run this!') - data.cancel = true;} -} -//unmute cmd -else if (data.message.startsWith(prefix + "unmute", 0) == true) { - if(player.hasTag('admin')){ - var setName = data.message.replace(prefix + "unmute ", ""); - setName.replaceAll(/'"'/g, ""); - player.runCommand('tag "' + setName +'" remove unmuted'); - player.runCommand(`tellraw @a[tag=admin,scores={notify=1}] {"rawtext":[{"text":"§6[§eSafeGuard Notify§6]§5§l "},{"text":"${sender} §bunmuted§l§5 ${setName}! §r"}]}`); - data.cancel = true;} - else{ - player.tell('§6[§eSafeGuard§6]§r§c§l You need admin tag to run this!') - data.cancel = true;} +world.beforeEvents.itemUseOn.subscribe((data) => { + const player = data.source; + let antiCBEon = (world.scoreboard.getObjective('anti_cbe_on') === undefined) ? false : true; + let antiItemsOn = (world.scoreboard.getObjective('item_on') === undefined) ? false : true; + + let item = data.itemStack; + if (item) { + if(player.hasTag("admin")) return; + if (config.cbeItems.includes(item.typeId) && antiCBEon) { + world.sendMessage(`§6[§eSafeGuard§6]§r§c§l ${player.nameTag} §r§4Placed illegal item: §l§c${item.typeId.replace("minecraft:","")}§r§4!§r`); + player.runCommandAsync('function punishment/warning/ill_warning'); + data.cancel = true; + } + if(config.bannedItems.includes(item.typeId) || item.typeId.endsWith("_spawn_egg") && antiItemsOn){ + world.sendMessage(`§6[§eSafeGuard§6]§r§c§l ${player.nameTag} §r§4Placed illegal item: §l§c${item.typeId.replace("minecraft:","")}§r§4!§r`); + player.runCommandAsync('function punishment/warning/ill_warning'); + data.cancel = true; + } } +}); + +world.beforeEvents.chatSend.subscribe((data) => { + const player = data.sender; + const message = data.message; + const args = message.substring(config.prefix.length).split(" "); + const sender = data.sender.name; -//invsee cmd - else if (data.message.startsWith(prefix + "invsee", 0) == true) { - if(player.hasTag('admin')){ + if(player.hasTag('muted') || player.hasTag('Ban')){ + player.sendMessage('§6[§eSafeGuard§6]§r§c You are muted!') data.cancel = true; - var setName=data.message.replace(prefix + "invsee ", ""); - player.runCommand(`tag @s add invseerequested`) - player.runCommand(`tag "${setName}" add invsee`); - player.runCommand(`tellraw @a[tag=admin,scores={notify=1}] {"rawtext":[{"text":"§6[§eSafeGuard Notify§6]§5§l "},{"text":"${sender} §bviewed inventory of§l§5 ${setName}! §r"}]}`); - return invsee();} - else{ - player.tell('§6[§eSafeGuard§6]§r§c§l You need admin tag to run this!') - data.cancel = true;} + return; } -//Unknown command - else if (data.message.startsWith(prefix) == true) - { - var splitMsg = data.message.split(prefix); - var setMsg = splitMsg[1]; - var splitCmd = setMsg.split(' '); - var setCmd = splitCmd[0]; - if (setCmd == "") { - data.cancel = false; - } - else { - player.runCommand('tellraw @s {"rawtext":[{"text":"§cUnknown command: §f' + setCmd + '"}]}'); + if(!player.hasTag("admin")){ + player.sendMessage('§6[§eSafeGuard§6]§r§c You need admin tag to run this!') + data.cancel = true; + return; + } + switch(args[0]){ + case "help": + player.sendMessage(`§l§aPREFIX:§2 §r${config.prefix}\n§l§aCOMMANDS:\n§r§eban §r|| to ban a person || ban Steve\n§einvsee §r|| see inventory of a player\n§emute §r|| mute a player || mute Steve\n§eunmute §r || unmute a player || unmute Steve`); data.cancel = true; - } - } + break; -}); + case "invsee": + data.cancel = true; + var setName = data.message.replace(config.prefix + "invsee ", ""); + setName = setName.replaceAll('"', "").replaceAll('@', ""); + if(getPlayerByName(setName).hasTag("admin")) return player.sendMessage(`§6[§eSafeGuard§6]§f Can't view inventory of §e${setName}§f, they're an admin.`); + player.runCommandAsync(`tellraw @a[tag=admin,scores={notify=1}] {"rawtext":[{"text":"§6[§eSafeGuard Notify§6]§5§l "},{"text":"${sender} §bviewed inventory of§l§5 ${setName.replace("@","")}! §r"}]}`); + invsee(sender, setName); + break; + + case "ban": + var setName = data.message.replace(config.prefix + "ban ", ""); + setName = setName.replaceAll('"', "").replaceAll('@', ""); + data.cancel = true; + if(!canFindPlayer(setName)) return player.sendMessage(`§6[§eSafeGuard§6]§f Player §e${setName}§f was not found`); + if(getPlayerByName(setName).hasTag("admin")) return player.sendMessage(`§6[§eSafeGuard§6]§f Can't ban §e${setName}§f, they're an admin.`); + player.runCommandAsync('tag "' + setName +'" add Ban'); + player.sendMessage(`§6[§eSafeGuard§6]§f Banned §e${setName}`); + player.runCommandAsync(`tellraw @a[tag=admin,scores={notify=1}] {"rawtext":[{"text":"§6[§eSafeGuard Notify§6]§5§l "},{"text":"${sender} §bbanned§l§5 ${setName}! §r"}]}`); + break; + case "mute": + var setName = data.message.replace(config.prefix + "mute ", ""); + setName = setName.replaceAll('"', "").replaceAll('@', ""); + data.cancel = true; + if(!canFindPlayer(setName)) return player.sendMessage(`§6[§eSafeGuard§6]§f Player §e${setName}§f was not found`); + if(getPlayerByName(setName).hasTag("admin")) return player.sendMessage(`§6[§eSafeGuard§6]§f Can't mute §e${setName}§f, they're an admin.`); + player.runCommandAsync('tag "' + setName +'" add muted'); + player.sendMessage(`§6[§eSafeGuard§6]§f Muted §e${setName}`); + player.runCommandAsync(`tellraw @a[tag=admin,scores={notify=1}] {"rawtext":[{"text":"§6[§eSafeGuard Notify§6]§5§l "},{"text":"${sender} §bmuted§l§5 ${setName}! §r"}]}`); + break; -world.events.tick.subscribe(() => { - [...world.getPlayers()].forEach(player => { - let plrName = player.name; - let Chars = /[^A-Za-z0-9_\-() ]/; - let Chars2 = /("|\\)/; - const inv = player.getComponent("minecraft:inventory").container; - const bannedItems = ['minecraft:allow', 'minecraft:command_block', 'minecraft:repeating_command_block', 'minecraft:chain_command_block', 'minecraft:border_block', 'minecraft:mob_spawner', 'minecraft:command_block_minecart','minecraft:flowing_lava', 'minecraft:lava', 'minecraft:flowing_water', 'minecraft:water', 'minecraft:lit_redstone_lamp', 'minecraft:pistonarmcollision', 'minecraft:tripwire', 'minecraft:unpowered_comparator', 'minecraft:powered_comparator', 'minecraft:fire', 'minecraft:lit_furnace', 'minecraft:lit_redstone_ore', 'minecraft:unlit_redstone_torch', 'minecraft:portal','minecraft:structure_block', 'minecraft:powered_repeater', 'minecraft:invisiblebedrock','minecraft:bedrock', 'minecraft:end_gateway', 'minecraft:end_portal', 'minecraft:end_portal_frame', 'minecraft:structure_void', 'minecraft:chalkboard', 'minecraft:bubble_column', 'minecraft:lit_smoker', 'minecraft:lava_cauldron', 'minecraft:jigsaw', 'minecraft:lit_blast_furnace', 'minecraft:light_block', 'minecraft:stickypistonarmcollision', 'minecraft:soul_fire', 'minecraft:lit_deepslate_redstone_ore', 'minecraft:camera', 'minecraft:deny', 'minecraft:barrier', 'minecraft:glowingobsidian', 'minecraft:glow_stick', 'minecraft:netherreactor', 'minecraft:info_update', 'minecraft:npc_spawn_egg', 'minecraft:glow_squid_spawn_egg', 'minecraft:axolotl_spawn_egg', 'minecraft:goat_spawn_egg', 'minecraft:strider_spawn_egg', 'minecraft:bee_spawn_egg', 'minecraft:fox_spawn_egg', 'minecraft:wandering_trader_spawn_egg', 'minecraft:panda_spawn_egg', 'minecraft:cod_spawn_egg', 'minecraft:tropical_fish_spawn_egg', 'minecraft:salmon_spawn_egg', 'minecraft:pufferfish_spawn_egg', 'minecraft:cat_spawn_egg', 'minecraft:turtle_spawn_egg', 'minecraft:parrot_spawn_egg', 'minecraft:dolphin_spawn_egg', 'minecraft:llama_spawn_egg', 'minecraft:polar_bear_spawn_egg', 'minecraft:zombie_horse_spawn_egg', 'minecraft:skeleton_horse_spawn_egg', 'minecraft:mule_spawn_egg', 'minecraft:donkey_spawn_egg', 'minecraft:horse_spawn_egg', 'minecraft:ocelot_spawn_egg', 'minecraft:bat_spawn_egg', 'minecraft:rabbit_spawn_egg', 'minecraft:squid_spawn_egg', 'minecraft:mooshroom_spawn_egg', 'minecraft:villager_spawn_egg', 'minecraft:wolf_spawn_egg', 'minecraft:sheep_spawn_egg', 'minecraft:pig_spawn_egg', 'minecraft:cow_spawn_egg', 'minecraft:chicken_spawn_egg', 'minecraft:piglin_brute_spawn_egg', 'minecraft:zoglin_spawn_egg', 'minecraft:hoglin_spawn_egg', 'minecraft:piglin_spawn_egg', 'minecraft:drowned_spawn_egg', 'minecraft:vex_spawn_egg', 'minecraft:evoker_spawn_egg', 'minecraft:ravager_spawn_egg', 'minecraft:phantom_spawn_egg', 'minecraft:vindicator_spawn_egg', 'minecraft:endermite_spawn_egg', 'minecraft:shulker_spawn_egg', 'minecraft:elder_guardian_spawn_egg', 'minecraft:guardian_spawn_egg', 'minecraft:wither_skeleton_spawn_egg', 'minecraft:husk_spawn_egg', 'minecraft:stray_spawn_egg', 'minecraft:witch_spawn_egg', 'minecraft:zombie_villager_spawn_egg', 'minecraft:blaze_spawn_egg', 'minecraft:magma_cube_spawn_egg', 'minecraft:ghast_spawn_egg', 'minecraft:cave_spider_spawn_egg', 'minecraft:silverfish_spawn_egg', 'minecraft:enderman_spawn_egg', 'minecraft:slime_spawn_egg', 'minecraft:spider_spawn_egg', 'minecraft:zombie_pigman_spawn_egg', 'minecraft:skeleton_spawn_egg', 'minecraft:creeper_spawn_egg', 'minecraft:zombie_spawn_egg'] - const cbeItems = ["minecraft:dispenser","minecraft:movingblock", "minecraft:moving_block", "minecraft:beehive", "minecraft:bee_nest", 'minecraft:cod_bucket', 'minecraft:salmon_bucket', 'minecraft:tropical_fish_bucket', 'minecraft:pufferfish_bucket', 'minecraft:axolotl_bucket', 'minecraft:tadpole_bucket'] - if (player.hasTag('Ban')) { - player.runCommand('kick "' + plrName + '"§6[§eSafeGuard§6]§r §l§4You are banned!'); - } - //check if gametest if on - try { player.runCommand('scoreboard players set @a[scores={setup_success=2}] setup_success 3'); } catch { } - - //item checks - for (let i = 0; i < 36; i++) { - const item = inv.getItem(i) - if (!item) continue; - const itemName = item.nameTag ?? '' - //illegal name check - if (itemName.length > 30) { - if (player.hasTag('admin')) return; - else { - inv.setItem(i, new ItemStack(Items.get('coal'), 0)) - world.say('§6[§eSafeGuard§6]§r§c§l ' + plrName + ' §r§4Has illegal item: §l§c' +item.typeId.replace('minecraft:','') +'§l§4(chr limit exceeded§c ' + itemName.length + '§4/30)§4!§r') - player.runCommand('function punishment/warning/ill_warning'); - } + case "unmute": + var setName = data.message.replace(config.prefix + "unmute ", ""); + setName = setName.replaceAll('"', "").replaceAll('@', ""); + data.cancel = true; + if(!canFindPlayer(setName)) return player.sendMessage(`§6[§eSafeGuard§6]§f Player §e${setName}§f was not found`); + if(!getPlayerByName(setName).hasTag("muted")) return player.sendMessage(`§6[§eSafeGuard§6]§f Player §e${setName}§f is not muted.`); + player.runCommandAsync('tag "' + setName +'" remove muted'); + player.sendMessage(`§6[§eSafeGuard§6]§f Unmuted §e${setName}`); + player.runCommandAsync(`tellraw @a[tag=admin,scores={notify=1}] {"rawtext":[{"text":"§6[§eSafeGuard Notify§6]§5§l "},{"text":"${sender} §bunmuted§l§5 ${setName}! §r"}]}`); + break; + + default: + if(!message.startsWith(config.prefix)) return; + var splitMsg = data.message.split(config.prefix); + var setMsg = splitMsg[1]; + var splitCmd = setMsg.split(' '); + var setCmd = splitCmd[0]; + if (setCmd == "") { + data.cancel = false; + } + else { + player.runCommandAsync('tellraw @s {"rawtext":[{"text":"§cUnknown command: §f' + setCmd + '"}]}'); + data.cancel = true; } - else if (item.getLore().length > 0) { //items in surivial usually don't have lore in them so it is banned(note to make this a setting) - if (player.hasTag('admin')) return; - else { - inv.setItem(i, new ItemStack(Items.get('coal'), 0)) - world.say('§6[§eSafeGuard§6]§r§c§l ' + plrName + '§r §4Has illegal item: §c§l' +item.typeId.replace('minecraft:','') +'§4§l(lore chr limit exceeded§c ' + item.getLore().length + '§4/0)§4!§r') - player.runCommand('function punishment/warning/ill_warning'); + break; + } +}) + +Minecraft.system.runInterval(() => { +[...world.getPlayers()].forEach(player => { + const plrName = player.name; + const inv = player.getComponent("inventory").container; + + //check settings status + const antiItemsOn = (world.scoreboard.getObjective('item_on') === undefined) ? false : true; + const antiCBEon = (world.scoreboard.getObjective('anti_cbe_on') === undefined) ? false : true; + const autoModOn = (world.scoreboard.getObjective('auto_mod_on') === undefined) ? false : true; + const anti32kOn = (world.scoreboard.getObjective('32k_on') === undefined) ? false : true; + + const item = player.getComponent("minecraft:inventory").container.getItem(player.selectedSlot); + if(item && !player.hasTag("admin")){ + const itemName = item.nameTag ?? ''; + if (player.hasTag('admin')) return; + else{ + //illegal name check + if (itemName.length > 30 && antiItemsOn) { + world.sendMessage('§6[§eSafeGuard§6]§r§c§l ' + plrName + ' §r§4Has illegal item: §l§c' +item.typeId.replace('minecraft:','') +'§l§4(chr limit exceeded§c ' + itemName.length + '§4/30)§4!§r') + player.runCommandAsync('function punishment/warning/ill_warning'); + inv.setItem(player.selectedSlot, new Minecraft.ItemStack('air', 1)); + return; } - } - //banned item list check - for (let x = 0; x < cbeItems.length; x++) { - if (item.typeId == cbeItems[x]) { - if (player.hasTag('admin')) return; - else { - try{ - player.runCommand('execute as @s[scores={anti_cbe_on=0}] run function punishment/warning/ill_warning'); - player.runCommand('execute as @s[scores={anti_cbe_on=0}] run tellraw @a {"rawtext":[{"text":"§6[§eSafeGuard§6]§r§c§l ' + plrName + ' §r§4Was detected having banned item: §l§c' + cbeItems[x].replace('minecraft:','') + '§4!§r"}]}') - inv.setItem(i, new ItemStack(Items.get('coal'), 0)); - player.runCommand('execute as @s[scores={anti_cbe_on=0,auto_mod_on=0}] run kick "' + plrName + '" §l§4kicked by §eSafe§6Guard §4AntiCheat\n For obtaining banned item: §c' + cbeItems[x].replace('minecraft:','')); - }catch{} + else if (item.getLore().length > 0 && antiItemsOn) { //items in surivial usually don't have lore in them so it is banned(note to make this a setting) + world.sendMessage('§6[§eSafeGuard§6]§r§c§l ' + plrName + '§r §4Has illegal item: §c§l' +item.typeId.replace('minecraft:','') +'§4§l(lore chr limit exceeded§c ' + String(item.getLore()).length + '§4/0)§4!§r') + player.runCommandAsync('function punishment/warning/ill_warning'); + inv.setItem(player.selectedSlot, new Minecraft.ItemStack('air', 1)); + return; } - } - } + //keyword ban check + for(var u = 0; u < config.bannedKeyWords.length; u++){ + if (String(itemName.toLowerCase()).includes(config.bannedKeyWords[u]) && antiItemsOn) { + world.sendMessage('§6[§eSafeGuard§6]§r§c§l ' + plrName + '§r §4Has illegal item: §c§l' +item.typeId.replace('minecraft:','') +' §r§4with banned keyword, item name:§r ' + String(itemName) + '§4!§r'); + inv.setItem(player.selectedSlot, new Minecraft.ItemStack('air', 1)); + return; + }} - //cbe item list check - for (let x = 0; x < bannedItems.length; x++) { - if (item.typeId == bannedItems[x]) { - if (player.hasTag('admin')) return; - else { - try{ - player.runCommand('execute as @s[scores={item_on=0}] run function punishment/warning/cbe_warning'); - player.runCommand('execute as @s[scores={item_on=0}] run tellraw @a {"rawtext":[{"text":"§6[§eSafeGuard§6]§r§c§l ' + plrName + ' §r§4Was detected having banned item: §l§c' + bannedItems[x].replace('minecraft:','') + '§4!§r"}]}'); - inv.setItem(i, new ItemStack(Items.get('coal'), 0)) - player.runCommand('execute as @s[scores={item_on=0,auto_mod_on=0}] run kick "' + plrName + '" §l§4kicked by §eSafe§6Guard §4AntiCheat\n For obtaining banned item: §c' + bannedItems[x].replace('minecraft:','')); - }catch{} + //cbe item list check + if (config.cbeItems.includes(item.typeId) && antiCBEon) { + player.runCommandAsync('function punishment/warning/ill_warning'); + world.sendMessage('§6[§eSafeGuard§6]§r§c§l ' + plrName + ' §r§4Was detected having banned item: §l§c' + item.typeId.replace('minecraft:','') + '§4!§r') + inv.setItem(player.selectedSlot, new Minecraft.ItemStack('air', 1)); + if(autoModOn) return player.runCommandAsync('kick "' + plrName + '" §l§4kicked by §eSafe§6Guard §4AntiCheat\n For obtaining banned item: §c' + item.typeId.replace('minecraft:','')); } - } - } - //ill enchant check - let illEnchantStatus = world.scoreboard.getObjective('32k_on').getScore(player.scoreboard); - const enchantments = item.getComponent("enchantments").enchantments; - let change = false; - for (const Enchantment in MinecraftEnchantmentTypes) { - const ItemEnchantment = enchantments.getEnchantment( - MinecraftEnchantmentTypes[Enchantment] - ); - if (!ItemEnchantment) continue; - const remove = () => { - enchantments.removeEnchantment(ItemEnchantment.type); - change = true; - }; - if (enchantments.slot == 0) { - if (!enchantments.canAddEnchantment(ItemEnchantment) && illEnchantStatus == 0) { - player.runCommand('tellraw @a[tag=admin] {"rawtext":[{"text":"§6[§eSafeGuard§6]§r§c§l ' + plrName + ' §r§4Has illegal item: §l§c' + item.typeId.replace('minecraft:', '') + '§r§4 with unobtainable enchant §l§c' + ItemEnchantment.type.id + '§r§4!§r"}]}'); - remove(); - player.runCommand('function punishment/warning/ill_warning'); - } - } else { - if (ItemEnchantment.level > ItemEnchantment.type.maxLevel/*change this to a number for custom max enchant level*/ || ItemEnchantment.level <= 0 && illEnchantStatus == 0) { - player.runCommand('tellraw @a[tag=admin] {"rawtext":[{"text":"§6[§eSafeGuard§6]§r§c§l ' + plrName + ' §r§4Has illegal item: §l§c' + item.typeId.replace('minecraft:', '') + '§4 with §c' + ItemEnchantment.type.id + '§4 lvl §c' + ItemEnchantment.level + '§4/' + ItemEnchantment.type.maxLevel + '!§r"}]}'); - remove(); - player.runCommand('function punishment/warning/ill_warning'); - } + + //banned item list check + if (config.bannedItems.includes(item.typeId) || item.typeId.endsWith("_spawn_egg") && antiItemsOn) { + player.runCommandAsync('function punishment/warning/cbe_warning'); + world.sendMessage('§6[§eSafeGuard§6]§r§c§l ' + plrName + ' §r§4Was detected having banned item: §l§c' + item.typeId.replace('minecraft:','') + '§4!§r'); + inv.setItem(player.selectedSlot, new Minecraft.ItemStack('air', 1)); + if(autoModOn) return player.runCommandAsync('kick "' + plrName + '" §l§4kicked by §eSafe§6Guard §4AntiCheat\n For obtaining banned item: §c' + item.typeId.replace('minecraft:','')); } + + } + } - if (!change) continue; - item.getComponent("enchantments").enchantments = enchantments; - inv.setItem(i, item); - } + if (player.hasTag('Ban')) { + (async() => { + //wait 2 seconds before kicking for chance to unban + await new Promise(resolve => setTimeout(resolve, 2000)); + player.runCommandAsync('kick "' + plrName + '"§6[§eSafeGuard§6]§r §l§4You are banned!'); + })(); + } + //check if gametest if on + try { player.runCommandAsync('scoreboard players set @a[scores={setup_success=2}] setup_success 3'); } catch { } + //end lock + if(player.dimension.id == "minecraft:the_end" && world.scoreboard.getObjective('end_lock') !== undefined){ + player.kill(); + } +}) +}); -//Namespoof Checker -let namespoofStatus = world.scoreboard.getObjective('nmspf_on').getScore(player.scoreboard); -if (player.nameTag.length > 16 && namespoofStatus == 0) { - //world.say(`${player.nameTag} §l§4was kicked by §eSafe§6Guard §4AntiCheat For detected §cNameSpoof/A`); - player.runCommand(`tag @s add kick`); +function invsee(sender, target) { + const senderPlayer = getPlayerByName(sender); + const targetPlayer = getPlayerByName(target); + if(targetPlayer == undefined) return senderPlayer.sendMessage(`§6[§eSafeGuard§6]§f Player §e${target}§f was not found`); + const inv = targetPlayer.getComponent("minecraft:inventory").container; + senderPlayer.sendMessage(`§6[§eSafeGuard§6]§f ${targetPlayer.nameTag}'s inventory:\n\n`); + for (let i = 0; i < inv.size; i++) { + const item = inv.getItem(i) + if (!item) continue; + const itemName = item.nameTag ?? '' + const { amount } = item; + if (item.typeId == "undefined") continue; + senderPlayer.sendMessage(`§6[§eSafeGuard§6]§f Slot §e${i}§f: §e${item.typeId.replace('minecraft:','')}§f x§e${item.amount} §fItem Name: §r${itemName}`) + } } -else if(Chars.test(player.nameTag) && namespoofStatus == 0) { - //world.say(`${player.nameTag} §l§4was kicked by §eSafe§6Guard §4AntiCheat For detected §cNameSpoof/B`); - player.runCommand(`tag @s add kick`); +function canFindPlayer(player){ + const target = [...world.getPlayers({ + name: player + })][0] + if(target == undefined) return false + else return true; } -else if (Chars2.test(player.nameTag) && namespoofStatus == 0) { - //world.say(`${player.nameTag} §l§4was kicked by §eSafe§6Guard §4AntiCheat For detected §cNameSpoof/B`); - player.runCommand(`tag @s add kick`); +function getPlayerByName(name){ + const player = [...world.getPlayers({ + name: name + })][0] + return player; } - //Anti crasher - const { x, y, z } = player.location - if (Math.abs(x) >= 30000000 || Math.abs(y) >= 30000000 || Math.abs(z) >= 30000000) { - if (player.hasTag('admin')) player.runCommand('tp @s[scores={nocrash_on=0}] 69 100000 69'); - else { - player.runCommand('tp @s[scores={nocrash_on=0}] 69 100000 69'); - player.runCommand('execute as @s[scores={nocrash_on=0}] run tellraw @a {"rawtext":[{"text":"§6[§eSafeGuard§6]§r§4§l §c' + plrName + ' §4Was detected using§c Crasher§4! "}]}'); - player.runCommand(`kick @s[name="${plrName}",scores={nocrash_on=0}] §l§4kicked by §eSafe§6Guard §4AntiCheat\n For §cCrasher Attempt`); - } - } - //death coords - else if(player.hasTag('death_coord')) { - player.runCommand(`tellraw @a[tag=death_coord] {"rawtext":[{"text":"§6[§eSafeGuard§6]§r §eYou died at ${Math.round(x)}, ${Math.round(y)}, ${Math.round(z)}"}]}`); - player.removeTag('death_coord') - } -}) + +world.afterEvents.entityHurt.subscribe((data) => { + const player = data.hurtEntity; + + if(player.typeId !== "minecraft:player") return; + + const hp = player.getComponent("health").current; + + if(hp <= 0) { + player.runCommandAsync("function assets/death_effect"); + + //death coords + let deathCoordStatus = (world.scoreboard.getObjective('death_coord_on') === undefined) ? false : true; + const { x, y, z } = player.location; + if(deathCoordStatus){ + player.sendMessage(`§6[§eSafeGuard§6]§r §eYou died at ${Math.round(x)}, ${Math.round(y)}, ${Math.round(z)} (in ${player.dimension.id.replace("minecraft:","")})`); + } + } }); - function invsee(){ - [...world.getPlayers()].forEach(player => { - const inv = player.getComponent("minecraft:inventory").container; - player.runCommand(`tellraw @a[tag=invseerequested] {"rawtext":[{"text":"§6[§eSafeGuard§6]§f ${player.nameTag}'s inventory:\n\n"}]}`); - for (let i = 0; i < inv.size; i++) { - const item = inv.getItem(i) - if (!item) continue; - const itemName = item.nameTag ?? '' - const { amount, data } = item; - const plrName = player.name; - if(player.hasTag('invsee')){ - if(item.typeId=="undefined") continue; - player.runCommand(`tellraw @a[tag=invseerequested] {"rawtext":[{"text":"§6[§eSafeGuard§6]§f Slot §e${i}§f: §e${item.typeId.replace('minecraft:','')}§f | §e${item.data}§f x§e${item.amount} §fItem Name: §r${itemName}"}]}`) - - } - } - player.removeTag('invsee'); - player.runCommand('tag @a remove invseerequested'); - } - ) - } \ No newline at end of file + + + Minecraft.system.events.beforeWatchdogTerminate.subscribe((beforeWatchdogTerminate) => { + beforeWatchdogTerminate.cancel = true; + + world.sendMessage(`§6[§eSafeGuard§6] §f${new Date()} |§4 A Watchdog Exception has been detected and has been cancelled successfully. Reason: §c${beforeWatchdogTerminate.terminateReason}`); + }); \ No newline at end of file diff --git a/Safeguard anti-cheat B/texts/en_US.lang b/Safeguard anti-cheat B/texts/en_US.lang index e8515a4..87feb62 100644 --- a/Safeguard anti-cheat B/texts/en_US.lang +++ b/Safeguard anti-cheat B/texts/en_US.lang @@ -1,4 +1,4 @@ -##bridge-file-version: #3 -pack.name=FTEES anti-cheat +##bridge-file-version: #3 +pack.name=safeguard anti-cheat pack.description=made by Blazer#9677 item.safeguard:admin_panel=Admin Panel \ No newline at end of file