ModeratorGui
ModeratorGui
A simple plug-in to allow your server operators/moderators to report whatever they do. Supports reporting issues with players, bans, unbans, promotions and demotions.
Every type is color-coded. Issues are yellow, bans dark red, unbans dark green, promotions green and demotions red.
This plug-in runs a very basic HTTP server, only files in the plugins/ModeratorGui/web folder are accessible. To access the web GUI, you connect to port 8273, you have to enter the password specified in config.yml.
A list of ranks can be specified to limit what can be entered when reporting promotions or demotions.
The plugin will try to match usernames to players that have once joined the server with the in-game commands. Ranks will also be matched.
The Web GUI can be modified to your desire, but is limited to how the web server works.
If you find any bugs or issues, or if you have suggestions, please comment explaining the issue or suggestion.
A preview of the WebGui:
Permissions
permissions: moderatorgui: default: op description: Command for full rights children: moderatorgui.command: true moderatorgui.command.admin: true moderatorgui.issue: true moderatorgui.ban: true moderatorgui.unban: true moderatorgui.promote: true moderatorgui.demote: true moderatorgui.review: true moderatorgui.viewreported: true moderatorgui.viewopenissues: true moderatorgui.export: true moderatorgui.import: true moderatorgui.uninstall: true moderatorgui.setpass: true moderatorgui.command: description: Allows using the plugin commands moderatorgui.command.admin: description: Allows using the admin commands moderatorgui.issue: description: Allows reporting issues with players moderatorgui.ban: description: Allows reporting banning a player moderatorgui.unban: description: Allows reporting unbanning a player moderatorgui.promote: description: Allows reporting promotions moderatorgui.demote: description: Allows reporting demotions moderatorgui.review: description: Allows reviewing reports moderatorgui.viewreported: description: "Allows seeing an issue when it's reported" moderatorgui.viewopenissues: description: Allows seeing wether a person has open issues moderatorgui.export: description: Allows exporting all reports to a binary file moderatorgui.import: description: Allows importing all reports from a binary file moderatorgui.uninstall: description: Allows deleting the database moderatorgui.setpass: description: Allows setting a password to be used on the webgui
Commands
/report help
- Displays /report sub-commands
/report issue <playername> <issue>
- Reports an issue
/report ban <playername> <reason>
- Reports banning a player
/report unban <playername> <reason>
- Reports unbanning a player
/report promote <playername> <oldrank> <newrank> <reason>
- Reports promoting a player
/report promote <playername> <oldrank> <newrank> <reason>
- Reports demoting a player
/review help
- Displays /review sub-commands
/review [page]
- Displays a page of reports
/review by <playername> [page]
- Displays a page of reports reported by a playername
/review target <playername> [page]
- Displays a page of reports that were reported about a player
/review close I:<id> [I:<id> [...]]
- Closes a report of a certain type, currently only supported type is I
for issue, can support multiple reports at once.
/moderatorgui
- Displays /moderatorgui sub-commands (Aliases: /modgui, /mg)
/moderatorgui help
- Displays /moderatorgui sub-commands
/moderatorgui setpass <password>
- Sets a password linked to your name for the WebGui, the password is hashed. HOWEVER, the password will be visible in the console when you run the command.
/moderatorgui export
- Exports the database into a binary file called data.bin in the plugin folder
/moderatorgui import
- Imports a data.bin binary file that was created with ModeratorGui into the database, clearing the database beforehand. WARNING: this cannot be undone
/moderatorgui uninstall
- Deletes the database and disables the plugin. Will not delete the plugin jar. WARNING: this cannot be undone
Config variables
The configuration has 2 sections where variables are used, the messages section and the perform section. Here is a list of the variables:
%id%
- The id of the report
%target%
- The name of the reported player
%reporter%
- The name of the reporting player
%reason%
- The reason of the report/action
%date%
- The date of the report, using the standard ModGui date format
%oldrank%
- Only used for promotions and demotions, the old rank of the player
%newrank%
- Only used for promotions and demotions, the new rank of the player
Web requests for custom web-pages
All requests start with /GENERATED/
(case-sensitive)
/GENERATED/LOGIN/username/password
- Returns a session that will be used for other requests followed by a list of available ranks sepperated by "/", or
"invalid"
if the supplied password was incorrect. The password has to be an SHA-256 encrypted string. /GENERATED/LIST/session/request_flags
- Returns a global list of reports, limited to a maximum of 500 results
/GENERATED/REPORTER/session/request_flags/username/
- Returns a list of reports where the reporter is username, limited to a maximum of 500 results
/GENERATED/REPORTED/session/request_flags/username/
- Returns a list of reports where the person being reported is username, limited to a maximum of 500 results
/GENERATED/REPORT/session/request_flags/reported/reason/previousRank/newRank//
- Creates a new report, created by the user bound to the session.
previousRank
andnewRank
can be empty if it is not required.
Every mention of request_flags
has to be replaced with a type filter. i
for issues, b
for bans, u
for unbans, p
for promotions and d
for demotions. If you want to get all types you can leave it blank or send ibupd
, this means that if any of the above flags are found it will find from all the supplied types. Do note that there are times that only one flag can be set.
Returned lists are in JSON format, a typical list would look like this (only displaying one of each type of report), newest reports are displayed first, the current reports are in no particular order.
[ { type: "issue", close: false, reporter: "adminname", reported: "somebaduser", time: "05-21-2012", reason: "He was being stupid" }, { type: "ban", reporter: "adminname", reported: "somebaduser", time: "05-21-2012", reason: "He wanted to get banned" }, { type: "unban", reporter: "adminname", reported: "somebaduser", time: "05-21-2012", reason: "He wanted to get unbanned" }, { type: "promote", reporter: "adminname", reported: "somebaduser", time: "05-21-2012", reason: "He wanted to get promoted", prev: "default", new: "admin" }, { type: "demote", reporter: "adminname", reported: "somebaduser", time: "05-21-2012", reason: "He was falsely promoted", prev: "admin", new: "default" } ]
When a request is made with an invalid session, a 403 - Forbidden error will be supplied. When the server encounters an error, a stack trace is printed to the console and a 500 - Internal Server Error will be supplied.
Planned features
- None currently
I am so glad I found this! I was about to make my own system from scratch >_>
If you want to make it more aesthetically pleasing, then try using the Bootstrap html framework. It's minimal work for great looks! http://getbootstrap.com
(Even bukkit uses bootstrap!)
I got the plugin install, but I do not know the pass to get into the moderation part, where do I find it?
Why is it when I load the plugin it shows these two messages then stops for 5 minutes, then loads?
5:31:11 PM [INFO] DataSourcePool [ModeratorGui] autoCommit[false] transIsolation[SERIALIZABLE] min[2] max[20] 5:31:12 PM [INFO] SubClassFactory parent ClassLoader [org.bukkit.plugin.java.PluginClassLoader]
Go in game and do this command for it to work !!Nekard moderatorgui setpass aajsngjdnsj
go to your login for the gui and enter your gamename and the pass you put in
@Nekard1984
I am getting the same thing
love it keep updated !!! <3
Ok so I goto for example http://127.0.0.1:8273/ after I have done a /modgui setpass 1234 for example and when I type the user name such as Nekard1984 and then the password 1234 for example it comes back with this error "Failed to validate password!" What am I doing wrong?
@kickface101
Well, when you connect to a server in minecraft you enter an IP address. Let's think about the imaginary IP address my.server.ip. If you want to access the web gui, you simply open your browser and navigate to http://my.server.ip:8273/ (8273 is the default port number, if you change this in the configuration then you will have to connect to that port.
I'm still not fully understanding how exactly to access the gui, can you please explain more on how to use this.
A new version has been uploaded! Please wait until it has been approved.
Changelog:
Updated to MC1.5.1
You can no longer manually set passwords in the config file, use /modgui setpass instead
WebGui now notifies if it is being accessed incorrectly
Add tab completion to commands
Decode reports from the WebGui to fix problems with spaces
Exceptions thrown when a WebGui page is requested will be more clearly printed to the console
Fix reporter/reported being able to be set to an empty string, causing an error in the WebGui
Fix demotions to be in the same order as all the rest
Make WebGui perform commands
Add PHP web files for a stand-alone WebGui
@heldplayer How can i run console commands from the config?
Help! the page says please wait . . . Loading
Is there any fix?
@mheiden
It doesn't do the ban / promote / demote by itself. There's a perform system built in that allows you to set it so certain commands are executed by the server, or by the player, when something gets reported.
Does this plugin works with groupmanager?
Because it doesnt make very clear this plugin does the ban / promote / demote by itself.
@Znomon
Thanks for trying to help me out, I tried this, but no luck:
perform: promote: - C:/pex group %newrank% user add %target% demote: - C:/pex group %newrank% user remove %target%
EDIT: I just noticed you had not used the " - C: " but only " - " infront of the command. I did it like this, and now it works, thanks a bunch man!
can it do temp ban, kick, banip, and mute?
@user_892472
perform: promote: - pex group %newrank% user add %target% demote: - pex group %newrank% user remove %target%
try these. this is how it works for me with pex
Nice plugin, Is it possible to remove a item from the list? And is it possible to have this running on an external webserver?
@djr3m0t3
ModeratorGui runs its own webserver, going to the HTML file itself won't work. You need to load the page using the set port.
@user_892472
I'm not familiar with how PEX works, but does it normally output a message if you run a command?
Hello I am trying to make the plugin demote and promote when the demote/promote report commands are run. I'm using PEX and would normally use this command to set a group:
/pex user PLAYERNAME group set GROUPNAME
I have now edited the config to match this: perform: promote: - C:/pex user %target% group set %newrank% demote: - C:/pex user %target% group set %newrank%
Yet it does not work, any idea of what i am doing wrong?