mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-01 14:38:56 +00:00
Warn server admins that NoCheatPlus is enabled.
This commit is contained in:
1 parent
3a73ca0f41
commit
cb1959d2c0
2 files changed
+16
-1
No files matched your search
@@ -37,6 +37,7 @@ import net.h31ix.anticheat.util.Configuration;
|
||||
import net.h31ix.anticheat.util.Utilities;
|
||||
import net.h31ix.anticheat.xray.XRayListener;
|
||||
import net.h31ix.anticheat.xray.XRayTracker;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
@@ -80,7 +81,17 @@ public class Anticheat extends JavaPlugin {
|
||||
getPluginLoader().disablePlugin(this);
|
||||
return;
|
||||
}
|
||||
// End test
|
||||
// Check if NoCheatPlus is installed
|
||||
Bukkit.getScheduler().runTaskLater(this, new Runnable() {
|
||||
public void run() {
|
||||
if (Bukkit.getPluginManager().getPlugin("NoCheatPlus") != null) {
|
||||
getLogger().severe("You are also running NoCheatPlus!");
|
||||
getLogger().severe("NoCheatPlus has been known to conflict with AntiCheat's results and create false cheat detections.");
|
||||
getLogger().severe("Please remove or disable NoCheatPlus to silence this warning.");
|
||||
}
|
||||
}
|
||||
}, 40L);
|
||||
// End tests
|
||||
if (verbose) {
|
||||
getLogger().log(Level.INFO, "Finished loading.");
|
||||
}
|
||||
|
||||
@@ -91,6 +91,10 @@ public class PastebinReport {
|
||||
} */
|
||||
|
||||
private void createReport(Player player) {
|
||||
if (Bukkit.getPluginManager().getPlugin("NoCheatPlus") != null) {
|
||||
report.append("------------ WARNING! ------------");
|
||||
report.append("This report was run with NoCheatPlus enabled. Results may be inaccurate." + '\n' + '\n');
|
||||
}
|
||||
report.append("------------ AntiCheat Report - " + format.format(date) + " ------------" + '\n');
|
||||
report.append("Version: " + Anticheat.getVersion() + (Anticheat.isUpdated() ? "" : " (OUTDATED)") + '\n');
|
||||
report.append("CraftBukkit: " + Bukkit.getVersion() + '\n');
|
||||
|
||||
Reference in new issue
Block a user