Data Packs Server Utility

Area Protection

  • 3.2k views 6 today
  • save_alt 255 downloads
Compatibility
Minecraft 1.21
to version
Minecraft 26.1
Changes include
    • 8
    • 8
    • 6
    ThirtyFangs
    Lvl 63High Grandmaster Hero
    121
    Area protection: protect anything you wish easily in one single command.




    If you don't want to read all this, you can just go in game and do /function, the commands will automatically be highlighted


    FAQ:
    Q: How to protect an area?
    A:
    With one command that you can find below. It will claim a 30 blocks radius area, and you can use the command as much as you want for each 30 blocks radius you want to claim! It can also easily be unclaimed.

    Q: How does the protection work, what does it protect?
    A: Once entering a protected area, mobs with griefable abilities will be killed (creeper, ravager, enderman, ender dragon, wither, phantom, warden) along with their loots.
    TNT & minecart tnt are disabled in a protected area.


    Armor stands, item frames & glowing item frames, painting, are automatically set to invincible in a protected area. They are switching back to destroyable once the area get unclaimed.
    Q: Will the datapack change something in my world if I install it?
    A: It will only change the gamerule sendCommandFeedback to false to prevent the spam of the gamemode change message in the chat. Nothing else is changed


    Q: If I uninstall the datapack, will the protections be gone?
    A: Yes, but they will be saved in case you reinstall the datapack later, unless you run /function area_protection:reset_all.

    The datapack only uses tags, not teams, so if your world has teams enabled, the datapack is compatible with it.

    How to use:


    Simply run the first command to protect an area! If you don't want to read all this, you can just go in game and do /function, the commands will automatically be highlighted



    •   /function area_protection:protect_this ----> Set a 30 blocks spherical protection around you.
    •   /function area_protection:reset_this -----> Remove the protection(s) applied at your position up to 40 blocks around you.
    • /function area_protection:reset_all ------> Remove all the protections of your world (No undo).
    • /function area_protection:view_protection_borders -----> Allows you to briefly see with particles the spherical protection of the area you are in.
    • /function area_protection:get_admin_permission_level ----> Allows you to bypass protection. A message will notify you when you are in a protected area, and you will be set in creative mode when running the command.
    • /function area_protection:get_player_permission_level ------> Reset your permission to default: You can't bypass protection

    Wish to give a player permission to build in every protected area, but not wanting to op him? Just do /execute as "name of the player" run function area_protection:get_admin_permission_level. He will be set in creative mode and will be able to build in every protected area.

    4 Update Logs

    Update #4 : by ThirtyFangs 05/18/2026 10:21:00 amMay 18 @ 2:21 pm UTC

    • Updated the download link to latest versions
    LOAD MORE LOGS

    More like this

      Have something to say?

    Penturt
    05/17/2025 5:27 pm
    He/Him • Level 5 : Apprentice Network
    ThirtyFangs will this work for 1.21.5, and also is it possible set it to claim a chunk at a time, rather then 30 block radius?
    1
    ThirtyFangs
    05/18/2025 12:17 pm
    Level 63 : High Grandmaster Hero
    history
    Hello, yes it works in 1.21.5! For the chunk, I don't think it's possible to check for chunk position, but you can manually change the range of claiming in data/area_protection/function/dont_touch_main.mcfunction at line 1 & 2!
    1
    Drati
    02/02/2025 10:14 am
    Level 1 : New Miner
    history
    Hello,
    Don't know it it's a bug or if I did something wrong but I have an issue with itemframes, they do a really annoying sound (only when they store an item) like if they were broken endlessly. Do you have any idea what's going on?
    Thank anyway for your datapack! It's very useful and simple to use.
    1
    ThirtyFangs
    02/03/2025 9:59 am
    Level 63 : High Grandmaster Hero
    Hello, thank you! I hadn't noticed, it's fixed now :)
    1
    RODHI
    10/29/2024 1:42 am
    Level 5 : Apprentice Miner
    i needed this bro 😭😭😭😭
    2
    speed3flash
    10/13/2024 3:11 pm
    Level 1 : New Miner
    Could you make the function command into a trigger? I can't use the command without cheats otherwise
    1

    Welcome