ModeratorGui

WebGUI preview

ModeratorGui

Github

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: 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 and newRank 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

You must login to post a comment. Don't have an account? Register to get one!

  • Avatar of BAI1 BAI1 Sep 06, 2014 at 19:44 UTC - 0 likes

    Having issues opening the database after I get a total of about either 100 or 127 issues. Is there any way to fix this without wiping the database? BAI1

  • Avatar of BAI1 BAI1 Aug 03, 2014 at 11:47 UTC - 0 likes

    No planned UUID implementation support? It'd be quite useful to have. BAI1

  • Avatar of uLeikSponges uLeikSponges Jan 20, 2014 at 19:14 UTC - 0 likes

    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!)

    BFAK:90804983,34a3cb0cc8d982096345e1c16a6b34d6aeb60f143d75918cbee81b41dbf3866f

  • Avatar of tjwmagic tjwmagic Nov 08, 2013 at 04:55 UTC - 0 likes

    I got the plugin install, but I do not know the pass to get into the moderation part, where do I find it?

  • Avatar of Builder874 Builder874 Jun 29, 2013 at 21:35 UTC - 0 likes

    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]

    http://i1360.photobucket.com/albums/r651/Builder874/lolban_zps9f73def4.png
    https://minestatus.net/59680-citycraft-survival-creative-hunger-games/image/original.png

  • Avatar of flawlessbraz1 flawlessbraz1 May 23, 2013 at 23:12 UTC - 0 likes

    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

    Skype:socomftb21david

    Want Great minecraft servers for very little money ?

    Click here for The best minecraft hosting

  • Avatar of flawlessbraz1 flawlessbraz1 May 23, 2013 at 23:07 UTC - 0 likes

    @Nekard1984: Go

    I am getting the same thing

  • Avatar of flawlessbraz1 flawlessbraz1 May 23, 2013 at 22:45 UTC - 0 likes

    love it keep updated !!! <3

  • Avatar of Nekard1984 Nekard1984 May 20, 2013 at 06:14 UTC - 1 like

    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?

  • Avatar of heldplayer heldplayer May 04, 2013 at 20:23 UTC - 0 likes

    @kickface101: Go

    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.

Facts

Date created
May 13, 2012
Categories
Last update
Apr 27, 2013
Development stage
Release
Language
  • enUS
License
AOL
Curse link
ModeratorGui
Downloads
7,807
Recent files

Authors