Skip to content

Repository files navigation

WorldBack

A Paper/Folia plugin that remembers where each player was in every world.

Vanilla drops you at spawn whenever you enter a world you've been away from. WorldBack saves your position per world and puts you back exactly where you left, so hopping between an overworld, a minigame world, and a creative build world stops costing you a walk home every time.

Worlds can also be grouped into WorldSets — for example an overworld/nether/end trio, or a season's worth of worlds. A WorldSet shares one respawn point and remembers which world in the group you were last in, so returning to the set returns you to the right world, not just the right coordinates.

Requirements

  • Paper or Folia (Folia is supported — all teleports and scheduling are region-aware)
  • BukkitOfUtils installed on the server
  • Java 21 (built against the 1.21.8 API)

Installation

Drop WorldBack-<version>.jar and BukkitOfUtils into plugins/ and start the server. config.yml and database-config.yml are generated on first run.

Commands

Command Description
/worldback <world> <player> Send a player back to their saved location in <world> (or that world's spawn if they have none).
/worldset create <name> Create an empty WorldSet.
/worldset add <name> <world> Add a world to a WorldSet.
/worldset remove <name> <world> Remove a world from a WorldSet.
/worldset join <name> (<player>) Teleport to your last location in the WorldSet. With no player, targets the sender.
/worldset teleport <name> (<player>) Same as join, but skips saved locations sitting inside a portal — use this when players keep landing back in the portal they came through. tp is an alias.
/worldset spawnpoint <name> Set the WorldSet's respawn point to your current location.

Permissions: worldback.commands.worldback and worldback.commands.worldset.

Configuration

config.yml

# Worlds WorldBack will not save locations for or teleport players within.
ignored-worlds:
  - some_lobby_world

# Per-world fallback spawn, used when a player has no saved location there.
# Populated automatically from the world's own spawn the first time it is needed.
world-spawns:
  world:
    x: 0.0
    y: 64.0
    z: 0.0
    yaw: 0.0
    pitch: 0.0

# WorldSets. Written by /worldset, but safe to edit by hand.
worldsets:
  main:
    worlds:
      - world
      - world_nether
      - world_the_end
    spawnpoint:        # optional
      world: world
      x: 0.0
      y: 64.0
      z: 0.0
      yaw: 0.0
      pitch: 0.0

database-config.yml

Player locations are stored in SQL. SQLite is the default and needs no setup.

database:
  type: SQLITE          # SQLITE or MYSQL
  sqlite-file-name: example.db
  table-prefix: example_

  # MySQL only
  host: localhost
  port: 3306
  database: example
  username: root
  password: password

How it works

  • Locations are recorded as you move, on world change, on quit, and by a background save every 10 seconds.
  • Changing worlds teleports you to your saved spot in the destination world, falling back to that world's configured spawn.
  • Portal travel is handled specially: the location is recorded a second after you arrive rather than at the portal exit, so you aren't sent straight back into the portal next time.
  • Respawning inside a WorldSet sends you to that set's spawnpoint, or to the first overworld-type world in the set if none is set. Bed and anchor respawns take priority and are left alone.

Building

.\gradlew.bat shadowJar

The jar lands in target/.

Wiki

BukkitOfUtils documentation is here.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages