Minecraft / Data Packs

Stake A Claim³ - Area Ownership (February 14, 2020)

  • check_circle Functions
  • 18
  • 18
  • comment27
  • playlist_add
  • share
  • more_horiz
avatar ZyRail
Level 36 : Artisan Miner
6
Stake A Claim³ - Area Ownership (Cubed)
Minecraft v1.15.2 (February 14, 2020)

MAJOR UPDATE - WILL BREAK OLD SPHERICAL CLAIMS!

Caution, the players can reach 5 blocks into your claim if they stand at the border.

How To Get The Book
Chat Command
/trigger SAC_Claim_Book

Block Protection By Claim
A data pack that will change players into adventure mode if not authorized to edit your claimed area. Soon as they leave the area they will be back into survival mode. Your mobs on your claim can also be protected by damage. There are 1,160,290,625 (65 to the power of 5) possible combinations for your ID Key!

Lock Doors, Chests, Or Other Objects!
You can lock doors, chests, levers, buttons, etc... in your claim with the "Stake A Claim" book. Use ["Lock At Head"], ["Lock At Feet"] to set a protection block at your head or feet position.

Animal Protection On Your Claim
You can toggle mob protection by the "Stake A Claim" book. Click on the text in the book to toggle protection on or off on any mob within 4 blocks of yourself if you are in your claim. This function can be disabled by the admin on the last page of the book. If you hold the book in your main hand then the protected mobs will glow so you can keep track of the ones you have protected.

How To Claim Land
Put any item with any amount in your first 5 hotbar slots then use the book to create your ID ["Generate Your ID #"]. The book will generate an ID depending on the amount of items in the stacks. Then use the "Stake A Claim" book to claim some land ["Claim Area"]. The claim will be 128W x 128H x 128D blocks with you being in the center. No one else can claim the neighboring 138 blocks. The claim text will be green indicating no owner. Assign your ID to the claim to set ownership ["Set Claim ID To Area"] and the text will turn white. You can change the claim size from the book as well. Expand your claim size by adding more claims with the same ID. Everyone that doesn't have the same Id will be stuck in adventure mode.

Creating Plots
You can create smaller areas in your claim that other people can use called plots. Click ["Create A Plot"] in the book and a green plot will appear. Leave it green so another player can claim it. The size can be changed as well. Don't overlap the plots or it won't hold the protection over the whole plot unless the over lapping plots have the same IDs. You can let random people claim them or you can set Ids to them and then give those Ids out to players.

Set Claim Limit Or Disable Mob Protection
To set claim limit, the ADMIN can go to the last page of the book or use "/trigger claim_setup" in chat. Click on the chat's text and change <limit> in the suggested command to a desired number. Set the claim limit to 0 to allow players to create infinite claims or set the limit to -1 to only let creative mode players claim land. ADMINS can also disable mob protection as well.

To Install
Just place the *.zip file at \AppData\Roaming\.minecraft\saves\*world*\datapacks\ You do not need to extract the files from the zip.

To Uninstall
Remove all claims by hand first by using these commands in chat at each claim location in your world.
/kill @e[​type=minecraft:armor_stand,name="Claim 16"]
/kill @e[​type=minecraft:armor_stand,name="Claim 32"]
/kill @e[​type=minecraft:armor_stand,name="Claim 64"]
/kill @e[​type=minecraft:armor_stand,name="Claim 128"]

Then run the uninstall function
/function stake_a_claim:uninstall

Creative Commons license
You have the right to share, use, and build upon this data pack for anything you wish, ENJOY!
Credithttps://minecraft.tools/en/book.php
CompatibilityMinecraft 1.15
Tags

21 Update Logs

February 14, 2020 : 02/14/2020 11:44:45 pmFeb 14th

Very Small Error Fix Update


File: animal_unprotected.mcfunction

Line 8 - Missing ] at the end of @a[scores={SAC_Unpro_Mob=1..}
execute as @a[scores={SAC_Unpro_Mob=1..}] at @s run tellraw @s ["",{"text":"Animal Protection Disabled By ADMIN","color":"red"}]

Line 11 - Missing ] at the end of @a[scores={SAC_Unpro_Mob=1..}
execute as @a[scores={SAC_Unpro_Mob=1..}] run scoreboard players reset @s SAC_Unpro_Mob
LOAD MORE LOGS

27 replies

2
02/11/2020 4:15 pm
Level 1 : New Miner
HauntSlider
Maybe I'm missing it, or someone else asked and I didn't read it correctly. How can I force a claim SIZE of 32, 16 etc?



Love the datapack.
1
02/12/2020 4:03 pm
Level 36 : Artisan Miner
ZyRail
Do you want to disable the larger claim and plot sizes all together?
1
02/12/2020 5:47 pm
Level 1 : New Miner
HauntSlider
Yeah, I want to make sure people can only claim like a 64x64x64 or 32x32x32
2
02/12/2020 6:28 pm
Level 36 : Artisan Miner
ZyRail
I would have to update the pack for admin options to disable the other claim sizes and have the default claim size start at 32x32x32 or I can tell you how.

In file create_claim.mcfunction
Change
execute as @s[​tag=!SAC_In_Near] at @s align xyz run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Invisible:1b,Invulnerable:1b,CustomName:"\"Claim 128\"",CustomNameVisible:1b,Marker:1b,Tags:[​Claim,Claim_Size_128]}
To
execute as @s[​tag=!SAC_In_Near] at @s align xyz run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Invisible:1b,Invulnerable:1b,CustomName:"\"Claim 32\"",CustomNameVisible:1b,Marker:1b,Tags:[​Claim,Claim_Size_32]}

Change
execute as @s[​tag=!SAC_In_Near] at @s run scoreboard players set @e[​type=minecraft:armor_stand,sort=nearest,limit=1,tag=Claim,name="Claim 128",distance=..5] SAC_Claim_ID_Key 0
To
execute as @s[​tag=!SAC_In_Near] at @s run scoreboard players set @e[​type=minecraft:armor_stand,sort=nearest,limit=1,tag=Claim,name="Claim 32",distance=..5] SAC_Claim_ID_Key 0

In file on_tick.mcfunction
Remove Lines
scoreboard players enable @a SAC_To_Claim_16
and
scoreboard players enable @a SAC_To_Claim_128
1
02/16/2020 7:23 am
Level 1 : New Miner
HauntSlider
Thanks so much.. I'll let you know how it works for us. :)
1
02/12/2020 5:06 am
Level 1 : New Miner
JackHunt93
when you create a claim, open the book. set the claim to your id the set it to che size you want in the second page.

Or modify the function create_claim.
2
02/03/2020 2:25 am
Level 1 : New Miner
JackHunt93
Hi, i'm stuying your datapack 'cause i make a claim system in my server that work with armor_stand and command blocks, but it generate some sorta of lags... Your datapack is wonderfull, perfect and clean but i'm trying to change the claim format from a sphere to a cube. With the dy=..64 (dy=63..64, dy=..63 and y=..64) argument in the on_tick block notes it make the datapack broken.
So I ask you for your help

Oh and i'm trying to integrate the datapack with a zone_protector system, so the players will be able to claim only Out of the protectet zone or in specifics site inside the protectet zone.
2
02/05/2020 9:59 am
Level 36 : Artisan Miner
ZyRail
Progress Report On New Square Claims!
Got a working square claim system in place. First 5 hot bar slots function as the same, creates a player claim ID. The last 3 hotbar slots now determines XYZ size of claim.

What Is Left To Add
Animal Protection
Locking Doors, Chests, ect...
Smaller Plots For Other Players In Claims

All Most Done With A Square Version!
1
02/06/2020 4:27 am
Level 1 : New Miner
JackHunt93
You, my friend, are a genius! After the Square Claims is done I will test it in my server and I will let you join the server to test it if you want (It's an italian server but don't worry, i will let you join without do the tutorials, the limitation system and in creative with the trigger commands to jump from adventure to survival to creative to spectator)
2
02/07/2020 1:07 am
Level 36 : Artisan Miner
ZyRail
I hit a road block with making the claims any size the player chooses. The problem is if there is a small claim next to a large one that the same player owns with the same ID Key Code attached to both only the closest claim to the player will determine if the player owns the claim and the large claim will be ignored, big problem. Meaning if you have small claims next to large ones then the large ones will not be protected where the two claims meet.

I can keep all the claims the same size and not let the player choose the size would work.
2
02/07/2020 5:15 amhistory
Level 1 : New Miner
JackHunt93
It's okay if they cannot choose the size. With the laggy and old-school system (command block with armor stand) I'd create only 2 types of claim site, 16x16 or 32x32 with fence or walls between sites. So if the players can only claim preconfigured claim sites (in protected zone) I think it will work.

And now the suggetions: For admin only, you can make so a protected zone where the players cannot claim anything if is not yet claimed. I used this system for protect zone (setting all the players in adventure mode if they were in protected zone AND in not ID-Matching zone).

I write here my system that I'm using in the server, maybe it will be usefull for you or for any1 need something like this:

First of all, let declare some entity and scoreboards:

  • Zoner - Armor Stand that protect some space-declared zones. It have a Protect 1
  • bloccato - Dummy scoreboard to lock or unlock people when they use the login trigger.
  • PlayerOwnerDif - Dummy scoreboard to check the difference between ID and PlayerOwner
  • PlayerOwner - Dummy scoreboard Armor Stand ID to set to who is the claim
  • ID - Dummy scoreboard Player ID
  • OwnerZone - Armor stand that have a PlayerOwner and set a 16x16 claim
  • OwnerZone32 - Armor stand that have a PlayerOwner and set a 32x32 claim
  • Protect - Dummy scoreboard to controll if players are inside or not protected zone. If Protect value is 1 the player is in adventure, if is 0 the players is in survival. Zoner have Protect value 1.




[​Always Active Repeating Command Block] : execute as @e[​type=minecraft:armor_stand,name=Zoner] at @s run scoreboard players set @a[​scores={bloccato=3..},gamemode=!creative,gamemode=!spectator] PlayerOwnerDif -1

If there is someone that had loaded a Zoner, will set to every1 the PlayerOwnerDif value to -1

----

[​Redstone Repeating Command Block] : execute as @e[​type=minecraft:armor_stand,name=OwnerZone] at @s run scoreboard players operation @a[​y=0,dx=15,dy=256,dz=15,scores={bloccato=3..}] PlayerOwnerDif = @s PlayerOwner

If the previous command did something, it will set the PlayerOwnerDif of the players inside the area of a OwnerZone equal to the PlayerOwner value of the OwnerZoner.


[​Always Active Conditional Chain Command Block] : execute as @e[​type=minecraft:armor_stand,name=OwnerZone] at @s run scoreboard players operation @a[​y=0,dx=15,dy=256,dz=15] PlayerOwnerDif -= @a[​y=0,dx=15,dy=256,dz=15] ID

When the previous command was perfomed, does the subtraction between the PlayerOwnerDif of the Player with him ID.

---------

[​Redstone Repeating Command Block] : execute as @e[​type=minecraft:armor_stand,name=OwnerZone32] at @s run scoreboard players operation @a[​y=0,dx=30,dy=256,dz=30,scores={bloccato=3..}] PlayerOwnerDif = @s PlayerOwner

Same one of the OwnerZone, but with the OwnerZone32



[​Always Active Conditional Chain Command Block] : execute as @e[​type=minecraft:armor_stand,name=OwnerZone32] at @s run scoreboard players operation @a[​y=0,dx=30,dy=256,dz=30] PlayerOwnerDif -= @a[​y=0,dx=30,dy=256,dz=30] ID

Same one of the OwnerZone, but with the OwnerZone32


[​Always Active Repeating Command Block] : scoreboard players set @a Protect 0

It will set Protect value of all the logged players to 0



[​Always Active Conditional Chain Command Block] : execute as @e[​type=minecraft:armor_stand,name=Zoner] at @s run scoreboard players operation @a[​y=0,dx=350,dy=256,dz=350] Protect = @s Protect

If a player is near a Zoner from 350 blocks onwards, will set for that Player Protect = 1 (in fact, Zoner have Protect value of 1)



[​Always Active Conditional Chain Command Block] : scoreboard players set @a[​scores={PlayerOwnerDif=0}] Protect 0

If, after the subtraction between PlayerOwnerDif and ID, the PlayerOwnerDif is 0, set Protect to 0


[​Always Active Repeating Command Block] : gamemode survival @a[​gamemode=adventure,scores={Protect=0,bloccato=3..}]
If a player is in adventure, logged and with Protect = 0 he will be changed in survival.



[​Always Active Repeating Command Block] : gamemode adventure @a[​gamemode=survival,scores={Protect=1,bloccato=3..}]

If a player is in survival, logged and with Protect = 0 he will be changed in adventure.



So, my suggetion is to let users create claim area where they want, but not in protected zone.

In protected zone they can only claim "created claim area".

Also, in protected area the gamemode of no Admin user will be changed in adventure, out protected area or "claim match claim area" inside protected area users will be changed in survival.
2
02/10/2020 3:19 pmhistory
Level 36 : Artisan Miner
ZyRail
I got the coding done. I just need to test multiplayer and create the Stake A Claim book. Players can claim multiple large Claims to create a protected area larger than 128 x 128 if they need to protect a large town. Then they become the claim owner and can create plots inside the claimed area. Unclaimed plots can be claimed by other players and then can only be edited by its plot owner and the owner of the claim it is on. You can have multiple different player plots in your claim like a town would. Those players can only edit if they are in their plots or outside your claim.
1
02/02/2020 3:03 am
Level 36 : Artisan Miner
ZyRail
Sorry for the close updates tonight. Was working on getting the new lock object feature just right. Just as I uploaded the new update I thought of something else to add to it. Now the lock protection will be disabled when close to the protected object and lock when moved farther away again.
1
02/02/2020 10:49 pm
Level 36 : Artisan Miner
ZyRail
OK, I'm pleased with the pack and will not be making further changes this week unless bugs are found. I found one more bug that I fixed with claims not recognizing IDs and keeping players from being able to join or leave a claim by changing IDs. Everything should be smooth now.
1
11/03/2019 11:36 amhistory
Level 1 : New Miner
milucojo
Hello
I want to modify the range of 64 blocks to about only 32. i have tried replacing the instances where the number 64 appears in the code but I can't seem to get it just right, since 64 is such an important number in programming haha. So when I try to use it on my server it says something like you can't use this trigger yet.

Could you give me any insight as to which numbers to change? Thank you for your plugin btw
1
11/26/2019 2:01 am
Level 36 : Artisan Miner
ZyRail
Sorry it took so long to answer, just saw your post yesterday on 11/24/2019. Just remember to change the book text as well to say "The claim will protect a range of 32 blocks from the center."
1
11/26/2019 1:12 am
Level 36 : Artisan Miner
ZyRail
Change claim_range values in "on_tick.mcfunction"

#Farther than 74 (distance=..(claim_range*2)+10) blocks from any claim then change near_claim to 0. Not near a claim, double claim range plus 10 blocks.
execute as @a[scores={near_claim=1}] at @s unless entity @e[name="Claim",type=minecraft:armor_stand,distance=..74] run scoreboard players set @s near_claim 0

#Within 74 (distance=..(claim_range*2)+10) blocks of your claim then change near_claim to 0. Can overlap your own claim, double claim range plus 10 blocks.
execute as @a[scores={near_claim=1}] at @s if score @s land_ID_key = @e[name="Claim",type=minecraft:armor_stand,sort=nearest,limit=1,distance=..74] land_ID_key run scoreboard players set @s near_claim 0

#Within 74 (distance=..(claim_range*2)+10) blocks of others claim then change near_claim to 1. To close to other user's claim, can't set a claim, double claim range plus 10 blocks.
execute as @a[scores={near_claim=0}] at @e[type=minecraft:armor_stand,name="Claim"] unless score @s land_ID_key = @e[type=minecraft:armor_stand,name="Claim",limit=1,distance=..74] land_ID_key run scoreboard players set @a[scores={near_claim=0},distance=..74] near_claim 1

#Claim Border Notification at (distance=(claim_range-1)...(claim_range)) unless (distance=..(claim_range-2))
execute as @a at @s if entity @e[type=minecraft:armor_stand,distance=31..32,name="Claim"] unless entity @e[type=minecraft:armor_stand,distance=..30,name="Claim"] run title @s times 20 50 20
execute as @a at @s if entity @e[type=minecraft:armor_stand,distance=31..32,name="Claim"] unless entity @e[type=minecraft:armor_stand,distance=..30,name="Claim"] run title @s subtitle {"text":"Claim Border"}
execute as @a at @s if entity @e[type=minecraft:armor_stand,distance=31..32,name="Claim"] unless entity @e[type=minecraft:armor_stand,distance=..30,name="Claim"] run title @s title {"text":""}

#Change Player's gamemode to adventure if inside other player's claim if not using "Adventure_Mode_Switcher" datapack. (distance=..(claim_range))
execute at @e[type=minecraft:armor_stand,name="Claim"] as @a[tag=!Stake_A_Claim_Adventure_Mode,distance=..32] unless score @s land_ID_key = @e[type=minecraft:armor_stand,limit=1,name="Claim",distance=..32] land_ID_key run gamemode adventure @s[tag=!Adventure_Mode_Switcher_Enabled]

#Add Stake_A_Claim_Adventure_Mode tag if inside other Player's claim for use in "Adventure_Mode_Switcher" datapack. (distance=..(claim_range))
execute at @e[type=minecraft:armor_stand,name="Claim"] as @a[tag=!Stake_A_Claim_Adventure_Mode,distance=..32] unless score @s land_ID_key = @e[type=minecraft:armor_stand,limit=1,name="Claim",distance=..32] land_ID_key run tag @s add Stake_A_Claim_Adventure_Mode

#Change Player's gamemode to survival if farther than 32 (claim_range) blocks from a claim if not using "Adventure_Mode_Switcher" datapack. (distance=..(claim_range))
execute as @a[tag=Stake_A_Claim_Adventure_Mode] at @s unless entity @e[type=minecraft:armor_stand,distance=..32,name="Claim"] run gamemode survival @s[tag=!Adventure_Mode_Switcher_Enabled]

#Remove Stake_A_Claim_Adventure_Mode tag if farther than 32 (claim_range) blocks from a claim if using "Adventure_Mode_Switcher" datapack. (distance=..(claim_range))
execute as @a[tag=Stake_A_Claim_Adventure_Mode] at @s unless entity @e[type=minecraft:armor_stand,distance=..32,name="Claim"] run tag @s remove Stake_A_Claim_Adventure_Mode

#Change Player's gamemode to survival if inside own claim if not using "Adventure_Mode_Switcher" datapack. (distance=..(claim_range))
execute at @e[type=minecraft:armor_stand,name="Claim"] as @a[distance=..32] if score @s land_ID_key = @e[type=minecraft:armor_stand,limit=1,name="Claim",distance=..32] land_ID_key run gamemode survival @s[tag=!Adventure_Mode_Switcher_Enabled]

#Remove Stake_A_Claim_Adventure_Mode tag if inside own claim if using "Adventure_Mode_Switcher" datapack. (distance=..(claim_range))
execute at @e[type=minecraft:armor_stand,name="Claim"] as @a[distance=..32] if score @s land_ID_key = @e[type=minecraft:armor_stand,limit=1,name="Claim",distance=..32] land_ID_key run tag @s remove Stake_A_Claim_Adventure_Mode
1
10/10/2019 9:42 pm
Level 1 : New Crafter
TheGreyBuilder
Awesome! Is there a limit to how much you can claim? May want to use this for a Survival Server. Nice job.
2
10/11/2019 1:11 amhistory
Level 36 : Artisan Miner
ZyRail
The admin can set the limit using the link "Change Claim Limit" on the last page of the claim book. Then click on the text "1. Set Claim Limit... Change <limit> to a desired number. CLICK HERE" in the chat panel. It will bring up a suggested admin command, change <limit> to a number.

Here is an example, for limit of 5 claims per player, the command would be:
/scoreboard players set #claim_limit claim_limit 5

Set to zero to have no limit.
1
10/11/2019 5:33 pm
Level 1 : New Crafter
TheGreyBuilder
Ah, thanks. I also have the question of how big a size of land is. 5x5 Blocks? 10x10 Blocks? Thanks for the fast response- either way, I'll use this if you don't mind!
1
10/12/2019 2:10 am
Level 36 : Artisan Miner
ZyRail
The claim is 64 blocks around the center claim marker in a sphere. So it just measures how far away you are from the claim, if you are withing a distance of 64 blocks, then you are inside the claimed zone. So it is not a square zone but a circle zone with a radius of 64 blocks.
2
09/28/2019 11:53 pm
Level 31 : Artisan Modder
SmileForDiscord
epic
2
09/29/2019 10:30 am
Level 36 : Artisan Miner
ZyRail
Thank You!
I know right, I always wanted something like this on a public server.
Planet Minecraft Logo

Website

© 2010 - 2020
www.planetminecraft.com

Welcome