Today I'm presenting you my first public plugin: ReportThat!
What is this plugin?
Hackers are everywhere, and often anti-cheats aren't enough to prevent your server from being populated with them. We need more, we need the feedback of the real players, and then this plugin comes in.
ReportThat! adds 2 commands: /report and /bug. We'll se bug later, first let's start off with /report.
Sintax: /report <playername> <reason>
This command report to the online admins the player and the reason why he got reported. You can decide in the config what message the player is going to receive.
Example of the command: /report Nickframe76 hacking, the player will receive this, with the default config: Thanks for your report; then is going to receive a list of warnings where you can say like: Please take not that this is a serious command. Use it at your own risk and etc etc...
and the mod is going to receive: Player has reported Nickframe76 for hacks.
Let's take a look at the bug command. This helps the owners of server, which are still in beta, to discover bugs and fix them quickly.
Take note! The badArgumentsError string in the config is shared between the two commands!
Sintax: /bug <bugdescription>
Same as the report command, the online operators will receive
Player has reported a bug! Description: description
Every message can be modified in config.
Here's an example of the config:
Everything is explained in the default config aswell.PHP:#ReportThatPlayer by Nickframe76
#Version 0.1 - Bugs may be out there...
#reportTag is the tag that you'll see each time a plugin message is sent.
#Format: (TAG) the report stuff
reportTag: "&c(REPORT) &r"
#reportMessage is the message if the report was successful.
reportMessage: "&cYour report has successfully sent to the admins."
#warningReportMessage is an alert that is sent to the player, usually saying that if he reported that person
#foolishly, he can get banned himself
- '&4Take note that this is a'
- '&4 is a serious command!'
#messageToModerators is the message sent to the mods when the command is used.
#Here you can use %playerreporter%: the reporter - %playerreported%: the player reported %reason%: the reason.
messageToModerators: "&6%playerreporter% &4has reported &c%playerreported% &4for: %reason%."
bugMessageToModerators: "&6%bugreporter% &4has reported a bug! Description &l: %description%"
#Here we got some errors if the player reported is not online or if the arguments are not correct.
badArgumentsError: "&cThe arguments are incorrect! Please use &4/report <playername> <reason>"
offlinePlayerError: "&cThe targeted player is not online!"
report.report.receive > If a player has this permission, he can receive the report message
report.bug.receive > Same as before, but with bug message.
To use it, import: me.nickframe.report.api.ReportAPI
You have 3 methods.
setReport sends, a message to the ops and who has permissions
setBug, same but send bug message
and with getReportApiMessage you can use %playerreported% for an easier message formatting
- Add custom error for /bug.
- Add feature to save the reports in a txt file or MySQL (maybe)
- Fix the bugs.
- Put the src on github
- Add API, if anyone needs it? done
Report them or, use /bugreport Nickframe76 description. May add that for real, LOL.
Please, feel free to give your honest review on the plugin.
Thanks for looking at this page.