
LastLocation
A Minecraft Plugin that safes the LastLocation of the Logout. So when they log back in they can do /LastLocation if they are (for example) forced to spawn on the hub. Now they are at their Logout location!
LastLocation is a lightweight, safe, and modern Paper plugin that stores a player’s last logout location and allows them to teleport back to it using /lastlocation.
Designed for Paper 1.20.10+ / 1.21+, built with JDK 21, and focused on performance, safety, and data integrity.
✨ Core Features
🚪 Last Logout Location
- Stores only the logout location
- ❌ Does NOT store death locations
- Supports server restart / shutdown
- Default FILE storage (one
.ymlper player) - Ready for SQLite / MySQL
⏱️ Save After X Seconds Online
- Logout location is saved only after a player has been online for X seconds
- Fully configurable
- Player receives an in-game message once saving becomes active
- Supports Essentials-style color codes (
&)
Example:
save:
min-online-seconds: 10
ready-message: "&aYour logout location is now being saved."
🧠 Safe Teleport System
Never teleports players into dangerous blocks such as:
Lava 🔥
Cactus 🌵
Powder Snow ❄️
Portal blocks 🌀
Other configured hazards
Checks:
Feet & head are passable
Solid ground below the player
No dangerous blocks nearby
Performance capped (max checks per teleport)
🛟 Rescue / Anti-Suffocation System
If a player somehow still ends up in danger:
The plugin automatically searches for a safe location within ±10 blocks
Rescue triggers on suffocation damage
Rescue is active for a short time after using /lastlocation
⚔️ PvP / PvE Combat Cooldown
/lastlocation is blocked while the player is in combat
Combat includes:
PvP
PvE
Projectiles
Damage events that are cancelled by other plugins
Cooldown behavior:
Resets every time the player hits or gets hit
No spam messages while in combat
Message is shown only when the command is used
Example:
combat:
cooldown-seconds: 15
🔁 Automatic Data Migration (No Data Loss)
Automatically migrates data from:
Old locations.yml
Old plugins/LastLocation/Data/*.yml
Also supports data/ (lowercase)
Creates automatic backups
Migration runs only once
Clear console summary:
Successfully migrated players
Skipped entries (missing world, invalid UUID, missing data)
🧩 Automatic Config Rebuild on Updates
Detects when a new plugin version is installed
Automatically:
Backs up the old config
Rebuilds the config using new defaults
Preserves all existing values
No manual config reset required
💾 Storage & Performance
FILE storage (default):
One .yml file per player
Lazy loading
Very low RAM usage
Ready for:
SQLite
MySQL
Async IO where possible
Hard performance caps to prevent lag
🧾 Commands
Command Description /lastlocation Teleport to your last logout location /lastlocation reload Reload the config (admin only)
🔐 Permissions
lastlocation.use:
default: true
lastlocation.admin:
default: op
⚙️ Compatibility
✅ Paper 1.20.10+
✅ Paper 1.21.x
✅ Java / JDK 21
❌ Not tested on Spigot / Bukkit
📦 Installation
Place LastLocation-x.x.x.jar into your /plugins folder
Start or restart the server
Done! 🎉
❤️ Design Philosophy Safety first
Never unexpected teleports
Minimal RAM usage
No data loss on updates
Production-ready defaults
