Skip to content

Plugin basics

How to make a /home plugin for your Minecraft server

What a good homes plugin does, the settings worth putting in config.yml, which permissions to use and a prompt that gets you a working /sethome and /home.

· Updated · 3 min read
Cover image: How to make a /home plugin for your Minecraft server

A homes plugin lets players save a location and teleport back to it. It is one of the first plugins most survival servers add, and a good one to build yourself because the idea is small and clear.

What a good homes plugin does

  • /sethome <name> saves the player's current location under a name.
  • /home <name> teleports back, and /home with no name goes to the only or the default home.
  • /delhome <name> removes one, and /homes lists them.
  • A limit on how many homes a player may have, ideally different per rank.
  • A short countdown before the teleport that cancels when the player moves or takes damage.

What belongs in config.yml

max-homes: 3
teleport-delay-seconds: 3
cancel-on-move: true
cooldown-seconds: 30
messages:
  home-set: "&aHome %name% saved."
  teleporting: "&eTeleporting in %seconds% seconds. Do not move."
  cancelled: "&cTeleport cancelled."

Every number and every message should live in the file, so you can change the countdown or translate the texts without touching code.

Permissions to plan

  • homes.use for the normal commands, default for everyone.
  • homes.limit.5 or similar nodes to give a rank more homes.
  • homes.bypass.delay so staff teleport instantly.
  • homes.admin to teleport to the homes of other players.

Things that go wrong

  • Homes saved by world name break when a world is renamed. Ask for the world to be stored by its unique id.
  • Teleporting into a block that is now solid. A careful plugin checks that the target is safe.
  • Data lost on a crash. Saving after each change, not only on shutdown, avoids that.

A prompt that works

Describe the commands, the limits and what should happen on movement, and say where the data is saved. The prompt below does that in three sentences and is a good starting point for the generator.

Variations worth considering

  • Homes in a menu, so players click a bed icon instead of typing a name.
  • A cost for setting a home, paid from the economy.
  • Homes shared with a friend through an invite command.
  • A limit per world, so players cannot place a home in the End.

How to test a homes plugin

Set a home, move away, run /home and move during the countdown to see it cancel. Then set more homes than the limit allows and check the message. Delete a home, restart the server and make sure the list is still correct. Finally, rename or unload the world where a home was saved and see how the plugin handles it.

Frequently asked questions

Where are the homes saved?

In a data file in the plugin folder. Ask the generator for a yml file or another format you prefer.

Can staff see homes of other players?

Yes, if you ask for an admin command and a permission such as homes.admin for it.

Will it work with my teleport plugin?

Usually yes, but two plugins that move the player at once can conflict. Test them together.

Written by

PluginForge Team

We build PluginForge, the AI Minecraft plugin creator. The guides come from what we see when plugins are generated, compiled and installed on Paper and Spigot servers.

More guides

RSS feed · All guides