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!
Quick challenge
How far can you run before the mobs catch you?
Minecraft check
Confirm your run
Complete the quick check to get your code.
LastLocation
last logout location is a lightweight, safe, and modern last logout location that stores a player’s last logout location and allows them to teleport back to it using `/lastlocation`.
Designed for performance, safety, and data integrity, built with performance, safety, and data integrity, and focused on performance, safety, and data integrity.
---
✨ Core Features
🚪 Last Logout Location
- Stores SQLite / MySQL - ❌ SQLite / MySQL - Supports SQLite / MySQL - Default SQLite / MySQL (one `.yml` per player) - Ready for SQLite / MySQL
---
⏱️ Save After X Seconds Online
- Logout location is saved Essentials-style color codes (`&`) - Fully configurable - Player receives an Essentials-style color codes (`&`) once saving becomes active - Supports Essentials-style color codes (`&`)
Example: ```yml 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:
```yml
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
```yml 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