A safe and lightweight OP management plugin that saves and restores player data when granting temporary operator permissions.
Created by RedCity Industries | Gamer100309
OpManager is a Minecraft plugin designed for server administrators who need to temporarily grant themselves OP permissions without losing their current gameplay progress. Unlike traditional OP commands, OpManager saves your inventory, position, gamemode, and more before granting OP, then restores everything when you're done.
Perfect for:
- ๐ ๏ธ Server maintenance without losing your survival progress
- ๐ฎ Switching between admin and player modes seamlessly
- ๐ Secure temporary OP access with whitelist support
- ๐พ Multiple storage strategies for different server needs
- ๐ Complete Data Backup: Saves inventory, armor, offhand, position, gamemode, XP, health, hunger, and potion effects
- ๐ One-Click Restore: Automatically restores everything when you remove OP
- ๐ Return Command: Teleport back to your saved position without removing OP
- ๐ฏ Inventory Recovery: Restore only your inventory while keeping OP active
- ๐ Whitelist System: Control who can use the plugin
- ๐ Multi-Language: Built-in English and German support (easily expandable)
- ๐พ Flexible Storage: Choose between RAM-only, disk-only, or hybrid storage
- ๐ป Vanish Integration: Optional automatic vanish disable on /opoff
โ ๏ธ Item Duplication Warning: Alerts players about potential duplication if they die during OP sessions- ๐ Verbose Logging: Detailed debug mode for troubleshooting
- ๐ Automatic Cleanup: Temporary files are deleted after /opoff
- ๐ก๏ธ Data Integrity: Deep cloning of items prevents unintended modifications
- Download the latest
OpManager.jarfrom Releases - Place the file in your server's
plugins/folder - Restart your server
- Configure
plugins/OpManager/config.ymlto your needs - Add trusted players to the whitelist
- Reload with
/reloador restart the server
| Command | Description | Aliases |
|---|---|---|
/opon |
Grants OP and saves your current player data | /op-on, /enableop |
/opoff |
Removes OP and restores your saved player data | /op-off, /disableop |
/opreturnback |
Teleports you back to your saved position (keeps OP) | /opreturn, /opback |
/opRestoreInventory |
Restores your saved inventory without removing OP | /oprestore, /opinv |
# Set your language
language: en # or 'de' for German
# Enable/disable inventory saving
inventory_save: true # false = only saves position & gamemode
# Whitelist protection
whitelist_enabled: true
whitelist:
- YourUsername
- TrustedAdmin
# Storage strategy
storage_strategy: DISK_AND_MEMORY # MEMORY_ONLY, DISK_ONLY, or DISK_AND_MEMORY| Strategy | Speed | Data Loss Risk | Use Case |
|---|---|---|---|
MEMORY_ONLY |
โก Fastest | Testing only | |
DISK_ONLY |
๐ Slower | โ Low | Servers with frequent restarts |
DISK_AND_MEMORY |
โก Fast | โ Very Low | Recommended for most servers |
# WARNING: Only enable if your vanish plugin has a dedicated "OFF" command
auto_disable_vanish: false
vanish_disable_command: "vanish off {player}"/vanish or /v), leave auto_disable_vanish set to false to avoid accidentally enabling vanish when you meant to disable it!
OpManager supports multiple languages out of the box:
- ๐ฌ๐ง English (
messages_en.yml) - ๐ฉ๐ช German (
messages_de.yml)
- Copy
messages_en.ymlormessages_de.yml - Rename it to
messages_<code>.yml(e.g.,messages_fr.ymlfor French) - Translate all messages in the file
- Set
language: frinconfig.yml - Reload the plugin
OpManager uses a whitelist-based permission system:
whitelist_enabled: true # Set to false to allow ALL players (not recommended!)
whitelist:
- AdminName
- TrustedModeratorwhitelist_enabled: false, ANY player can grant themselves OP!
- โ
Always keep
whitelist_enabled: truein production - โ Only add trusted administrators to the whitelist
- โ Regularly review your whitelist
- โ
Use
DISK_AND_MEMORYstorage for data safety
If you die during an active OP session, your items will drop at your death location. When you use /opoff, your saved items will be restored. This means you could pick up the dropped items AND have your saved items, resulting in item duplication!
To prevent duplication:
- Use
/opoffFIRST (restores your saved items) - Then decide: ignore the dropped items or pick them up
The plugin will warn you in chat if you die during an OP session.
If your vanish plugin uses a toggle command (one command to turn on/off), setting auto_disable_vanish: true could accidentally enable vanish instead of disabling it!
Safe commands (dedicated OFF):
vanish off {player}โsv off {player}โ
Risky commands (toggle):
vanish {player}โv {player}โ
OpManager is extremely lightweight:
| Scenario | RAM Usage |
|---|---|
1 player with /opon |
~40 KB (worst case) |
| 10 players simultaneously | ~400 KB |
| 100 players simultaneously | ~4 MB |
In practice, most sessions use only 10-20 KB per player due to partially filled inventories and fewer enchantments.
- OpManager (1 player): 40 KB
- One loaded Minecraft chunk: ~200 KB
- Typical Minecraft server: 2-8 GB
Conclusion: OpManager's memory footprint is negligible compared to your server's overall resource usage.
For detailed debug information, enable verbose logging:
verbose_logging: trueThis will show detailed information about:
- Data saving/loading operations
- Inventory copying steps
- Position restoration
- Storage operations
Q: My data wasn't saved!
A: Check if you're on the whitelist and if inventory_save: true in config.yml
Q: Items duplicated after death!
A: This is expected behavior. Always use /opoff before collecting dropped items.
Q: Vanish turned ON instead of OFF!
A: Your vanish plugin uses a toggle command. Set auto_disable_vanish: false in config.yml
Q: Data lost after server crash!
A: If using MEMORY_ONLY storage, this is expected. Switch to DISK_AND_MEMORY for safety.
When you run /opon with inventory_save: true:
- โ Full inventory (36 slots)
- โ Armor (4 slots)
- โ Offhand (1 slot)
- โ Position (world, x, y, z, yaw, pitch)
- โ Gamemode (survival, creative, adventure, spectator)
- โ Experience (level and progress)
- โ Health
- โ Hunger & saturation
- โ Potion effects (type, duration, amplifier)
With inventory_save: false:
- โ Position
- โ Gamemode
- โ Everything else
- RAM: Stored in Java HashMap (fastest, volatile)
- Disk:
plugins/OpManager/playerdata/<username>.yml(persistent, auto-deleted after/opoff)
1. You're playing survival: /opon
โ Your survival data is saved
โ You receive OP permissions
2. Do admin work in creative mode
โ Build, teleport, use WorldEdit, etc.
3. Done with admin tasks: /opoff
โ OP is removed
โ You're teleported back to your survival location
โ Your survival inventory, gamemode, XP, etc. are restored
โ Back to playing survival exactly where you left off!
Contributions are welcome! Feel free to:
- ๐ Report bugs via GitHub Issues
- ๐ก Suggest features via GitHub Pull requests
- ๐ Submit translations via GitHub Pull requests
- ๐ Improve documentation via GitHub Pull requests
Pull Requests are welcome! Please make sure to:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the GNU General Public License v3.0.
What this means:
- โ You can use, modify, and distribute this plugin freely
- โ You must share your modifications under GPL v3 as well
- โ You must provide source code when distributing
- โ You cannot sell this plugin without providing the source code
See the LICENSE file for full details or visit https://www.gnu.org/licenses/gpl-3.0.html
- Bug Reports & Feature Requests: GitHub Issues
- Source Code: GitHub Repository
For general questions, feel free to open a discussion on GitHub!
Created by: RedCity Industries | Gamer100309
Version: 4.0
Minecraft Version: 1.21+
API Version: 1.21
If you find this plugin useful, please consider giving it a star on GitHub!
Made with โค๏ธ by RedCity Industries