Open source API
You can use this API for your personal plugin, using public classes provided by this page.
First of all, you have to import classes:
import it.itpao25.NMSReport.api.ReportManager;
then:
ReportManager report = new ReportManager(OfflinePlayer player, String reason);
report.excute();
import it.itpao25.NMSReport.api.Stats;
List method
HashMap<String, Integer> usersTopApproved(boolean server)
list of players who have made most reports (approved reports)
HashMap<String, Integer> usersTopReported(boolean server)
list of players which were reported more (approved reports)
String
: nickname of player
Integer
: number of reports
Note: boolean server
allows to return with the reports only from specific server ("server-name" in config.yml), false allows to return with the number of reports for all servers
Single method
Integer getReportApprovated(OfflinePlayer p)
number of reports excuted by player and approved
Integer getReportOwnApproved(OfflinePlayer p)
number of reports on the player and approved