AdminMode Advanced
I'm a server owner and a beginning developer. One of the things that makes me sad about owning a server is that I can't actually play on my server very easily. The main thing stopping me from playing is business: when I'm on the server, I'm fixing something or helping someone.
But there's another issue: I only have one inventory. If I want to work on a server project, I have a specific inventory of building materials. If I want to play survival, I have a completely different inventory. Mixing the two inventories would be cheating. But I don't want to empty my survival inventory into a chest every time I want to go build something or help someone. And I also don't want to have to clear my building inventory every time I want to take a break and play a bit.
As you may have guessed, this plugin provides the solution! With a simple command, you can switch between your two inventories with ease! The data is persistent and will be saved across reloads and server shutdowns.
Commands
- /adminmode: When a user types this command, his or her inventory will be toggled between an admin inventory and a normal one. To do this, one requires the permission adminmode.main.
- /adminmode reload: This reloads the AdminMode config. Requires the permission adminmode.reload
And that's it. It's ready to go out of the JAR file!
Configuration
Now, if you want to add a little more configuration to your plugin, take a look at the configuration file.
#Items under this run after a particular change of mode #The placeholder <player> can be used to represent the players name #if the command starts with a / it is run by the player, otherwise it is run by #the console. commands: #Runs everytime a player switches generic: #- say <player> has switched modes #Runs when the player switches into admin mode toAdmin: #- gamemode <player> 1 #Runs when the player switches into survival mode toSurvival: #- /gamemode 0 #How much time to wait (in seconds) before saving all adminmode inventories. #This is also the time it will wait after plugin intialization to run #Defaults to 10 minutes savetime: 600 #Decides whether or not player should teleport on switching from AdminMode; teleportOnSwitch: false
Each of these contains a list of commands that can be run on server upon activation of the command. To add a command, just use configuration list notation. That is, add a hypen ("-") at the same column as the identifier (toAdmin, toSurvival, or generic), then add a space followed by the command. If the command starts with a slash ("/") the command will be run as a player, otherwise it will be run as a console. This set up can be used to change gamemode or tell players on the server what the admin is doing.
The savetime command controls how often the plugin auto saves. This autosaving feature is run asynchronized, so it won't effect gameplay very much. While a particular user's inventory is being saved, he/she cannot access it. However, this is a very short period of time, and it shouldn't be a problem.
TeleportOnSwitch controls whether or not a player teleports when he/she switches between adminmode and normal mode. If this is enabled, they will return to the position they switched modes from last when they switch. This allows a more integrated survival experience.
Misc
TODO List:
- Change color of Admin name tag upon change - Waiting for iTag or TagAPI to update
Disclaimer:
This plugin uses plugin metrics and so uploads certain information about your server to the plugin metrics site. This inclueds:
- Server version
- Java verison
- Server Software (Craftbukkit, Spigot, etc.)
- Rough Server Location
- Version of AdminMode Advanced you are using
To disable this, go to the PluginMetrics folder inside your plugins folder. Then edit the enclosed config.yml and change the "opt-out" value to true.
This plugin will automatically convert version 1 or version 1.1 files to version 1.2 files. It should automatically delete the version 1 files.
Note: This is my first plugin, and was more of a learning process than anything else. It may not be the highest quality, and I'm certainly open to constructive criticism.
/adminmode toggles inventory but the commands do not run + the config.yml is emptied every server restart.
Please fix, I love this plugin!
Best regards, mmalaaksonen.
A nice tool, but it seems not working with V1.8.3 ?
By typing "/adminmode" the inventory is switching fine, but the game mode doesn't change.
Greets Anna
@Luckyboy I can add aliases. Yes, I'm guessing it is like a player vault plugin. This isn't the only plugin of it's kind.
I like this plugin! I can now play Towny on my server instead of losing all my Towny stuff and I think that u should change the command to /buildingmode or /buildmode and please add something new. btw this is kinda like a player vault plugin.
@lexnator
Sorry I didn't see your comment till now, bukkit failed to notify me -.-
Anyway, I'll definitely consider it. This plugin is due for an update soon.
Hey, awesome plugin!
A nice feature would be that if you go back to player mode you get to the position you were and if you go to admin mode you get to the position you were as admin :)
Could you implement this?