Maintenance
Maintenance
Provides basic functions to inform your players if the server is under maintenance.
Features
- Allows the server administrator(s) to set the server to maintenance mode.
- Displays a message on the client to inform them about what is going on.
- Optionally kicks all players.
- Optionally executes MySQL query when maintenance mode is toggled (for website status etc).
Commands
/maintenance [MESSAGE] - (de)activates the maintenance mode.
If MESSAGE is not provided the default message will be displayed. A confirmation message will be shown in the server console and ingame. Also works in console.
Permissions Support
- Permissions (Ex)
- Bukkit Permissions
Permission Nodes
# allows a player/group to toggle maintenance mode on/off maintenance.toggle # players/groups with this permission won't be kicked maintenance.immune
Configuration maintenance/config.cfg:
# defines the default maintenance message defaultmsg=The server is currently under maintenance. # defines whether the server kicks players on entering maintenance mode kickplayers=true # defines whether ops are able to toggle maintenance mode opstoggle=false # defines whether ops are immune opsimmune=true # defines if the plugin executes the queries below mysql=false # MySQL connection data mysql-host=host mysql-port=port mysql-user=user mysql-password=pw mysql-database=dbc # MySQL query that is executed when the maintenance mode is turned on mysql-query-on=UPDATE `status` SET maintenance='true' LIMIT 1 # MySQL query that is executed when the maintenance mode is turned off mysql-query-off=UPDATE `status` SET maintenance='false' LIMIT 1
Thanks to
- Rollese for requesting new features and bringing the project back.
- stkeroro for the original request.
Download?
download?
Any idea when a release will be coming out for this plugin or where the download link is temporarily?
@rollese
I'm glad to hear that the issue was solved. Thanks again for your help. If you encounter any more issues or have feature requests do not hestitate to contact me. I'm going to do some code cleanup and make a proper release soon.
@Phil2812 No problem, that's why I'm here :P
The issue is solved now and it works perfectly! Thank you very much for your hard work!
@rollese
Thanks! It was a stupid mistake. Please try Version 0.2.1a. It should be fixed. Sorry that I don't even have the time to test my releases (I really could have fixed that before).
Phil
15:27:10 [INFO] [MT] Unable to execute query! 15:27:10 [SEVERE] java.sql.SQLException: Can not issue data manipulation statements with executeQuery(). 15:27:10 [SEVERE] at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073) 15:27:10 [SEVERE] at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:987) 15:27:10 [SEVERE] at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:982) 15:27:10 [SEVERE] at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927) 15:27:10 [SEVERE] at com.mysql.jdbc.StatementImpl.checkForDml(StatementImpl.java:434) 15:27:10 [SEVERE] at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1388) 15:27:10 [SEVERE] at net.plaxxxer.dev.maintenance.MySQLInterface.query(MySQLInterface.java:35) 15:27:10 [SEVERE] at net.plaxxxer.dev.maintenance.Maintenance.onCommand(Maintenance.java:98) 15:27:10 [SEVERE] at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40) 15:27:10 [SEVERE] at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:163) 15:27:10 [SEVERE] at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:355) 15:27:10 [SEVERE] at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:351) 15:27:10 [SEVERE] at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:506) 15:27:10 [SEVERE] at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:485) 15:27:10 [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374) 15:27:10 [SEVERE] at net.minecraft.server.ThreadServerApplication.run(SourceFile:417) 15:27:10 [INFO] [MT] Maintenance mode turned ON
@rollese
I will! Thanks for your feedback. Sorry that I don't have very much time to develop atm.
EDIT: Uploaded Maintenance_0.2a_debug.jar Replace Maintenance.jar with it in order to "enable" debugging. You could also look for messages like "[MT] MySQL Driver wasn't found!" or "[MT] Unable to connect to MySQL!" in your server log (previous to the "[MT] Unable to execute query!" message). You don't have to use the debug version to see those messages.
Greetings, Phil
I just tested it, but I can't get the MySQL query to work. The syntax is OK and working, tested in PHPMyAdmin. The host, port and credentials are also OK. I get the following message:
Maybe you could add a toggle-able debug mode, so you could get more detailed error messages in the log?
Thanks!
I would really like to this be developed. Keep up the work!