Home System

Allow players to set and teleport to personal home locations. Includes multiple homes, home limits, and safety features.

Setting Homes

Create a simple home setting command:

/cmd add sethome execute store result score @s home_x run data get entity @s Pos[0] && execute store result score @s home_y run data get entity @s Pos[1] && execute store result score @s home_z run data get entity @s Pos[2] && tellraw @s {"text":"Home set!","color":"green"}

Teleporting Home

Teleport to your saved home:

/cmd add home execute if score @s home_x matches -2147483648..2147483647 run tp @s ~ ~ ~ && tellraw @s {"text":"Teleported home!","color":"green"} || tellraw @s {"text":"No home set! Use /sethome first.","color":"red"}

Multiple Homes

Use custom syntax for named homes:

// In syntax.json
{
  "sethome": {
    "pattern": "/sethome ",
    "description": "Set a named home location"
  },
  "home": {
    "pattern": "/home ",
    "description": "Teleport to a named home"
  }
}

// In aliases.json
{
  "sethome_main": "scoreboard players operation @s home_main_x = @s x && tellraw @s {\"text\":\"Home 'main' set!\",\"color\":\"green\"}",
  "home_main": "execute if score @s home_main_x matches -2147483648..2147483647 run tp @s ~ ~ ~ || tellraw @s {\"text\":\"Home 'main' not set!\",\"color\":\"red\"}"
}

Home Limits

Restrict number of homes per player:

/cmd add sethome execute if score @s home_count matches ..2 run scoreboard players add @s home_count 1 && [set home] || tellraw @s {"text":"Maximum 3 homes allowed!","color":"red"}