diff --git a/Plugins/Mineplex.Core/src/mineplex/core/report/ReportCategory.java b/Plugins/Mineplex.Core/src/mineplex/core/report/ReportCategory.java index ca9970e41..1aad207a1 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/report/ReportCategory.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/report/ReportCategory.java @@ -15,20 +15,22 @@ public enum ReportCategory { // descriptions borrowed from PunishPage - HACKING(0, Material.IRON_SWORD, C.cRedB + "Hacking", "X-ray, Forcefield, Speed, Fly etc"), - CHAT_ABUSE(1, Material.BOOK_AND_QUILL, C.cDBlueB + "Chat Abuse", "Verbal Abuse, Spam, Harassment, Trolling, etc"); + HACKING(0, 3, Material.IRON_SWORD, C.cRedB + "Hacking", "X-ray, Forcefield, Speed, Fly etc"), + CHAT_ABUSE(1, 1, Material.BOOK_AND_QUILL, C.cDBlueB + "Chat Abuse", "Verbal Abuse, Spam, Harassment, Trolling, etc"); private int _id; + private int _notifyThreshold; private Material _displayMaterial; private String _title; private List _lore; - ReportCategory(int id, Material displayMaterial, String title, String... lore) + ReportCategory(int id, int notifyThreshold, Material displayMaterial, String title, String... lore) { - this._id = id; - this._displayMaterial = displayMaterial; - this._title = title; - this._lore = new ArrayList<>(); + _id = id; + _notifyThreshold = notifyThreshold; + _displayMaterial = displayMaterial; + _title = title; + _lore = new ArrayList<>(); // prefix are lore lines for (String loreLine : lore) { @@ -41,6 +43,11 @@ public enum ReportCategory return _id; } + public int getNotifyThreshold() + { + return _notifyThreshold; + } + public Material getItemMaterial() { return _displayMaterial; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/report/ReportManager.java b/Plugins/Mineplex.Core/src/mineplex/core/report/ReportManager.java index fcd3bbae2..6f0438d89 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/report/ReportManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/report/ReportManager.java @@ -157,7 +157,7 @@ public class ReportManager { _reportRepository.addElement(report); // add (or update) the report to Redis // only start notifying staff when - if (report.getReporters().size() >= 1) + if (report.getReporters().size() >= category.getNotifyThreshold()) { String prefix = getReportPrefix(reportId);