Massive messaging and config changes.

Furthermore:
+ Added basic KillAura angle check (a start to #52)
+ Fixed sneak false positives
+ Added staff alert messaging (anticheat.system.alert permission, see #28)
+ Language file now support color coding
+ Added debug-mode for testservers
+ Insignificant pom.xml and README.md updates
This commit is contained in:
Rammelkast committed 2020-03-25 17:41:44 +01:00
1 parent fec1286c8d
commit 27ca12aec3
30 files changed
+145 -170

No files matched your search

@@ -33,6 +33,7 @@ import org.bukkit.plugin.java.JavaPlugin;
import com.comphenix.protocol.ProtocolLibrary;
import com.comphenix.protocol.ProtocolManager;
import com.rammelkast.anticheatreloaded.check.combat.KillAuraCheck;
import com.rammelkast.anticheatreloaded.check.movement.BlinkCheck;
import com.rammelkast.anticheatreloaded.command.CommandHandler;
import com.rammelkast.anticheatreloaded.config.Configuration;
@@ -81,19 +82,20 @@ public class AntiCheatReloaded extends JavaPlugin {
if (Bukkit.getPluginManager().getPlugin("ProtocolLib") != null) {
this.setupProtocol();
} else {
Bukkit.getConsoleSender().sendMessage("[ACR] " + ChatColor.RED + "Shutting down, ProtocolLib not found!");
Bukkit.getConsoleSender().sendMessage(ChatColor.GOLD + "" + ChatColor.BOLD + "ACR " + ChatColor.RED + "Shutting down, ProtocolLib not found!");
Bukkit.getPluginManager().disablePlugin(this);
return;
}
getLogger().info("NMS version is " + VersionUtil.getVersion());
if (!VersionUtil.isSupported()) {
Bukkit.getConsoleSender().sendMessage("[ACR] " + ChatColor.RED + "The version of this server is NOT supported by ACR! The plugin will be buggy!");
Bukkit.getConsoleSender().sendMessage(ChatColor.GOLD + "" + ChatColor.BOLD + "ACR " + ChatColor.RED + "The version of this server is NOT supported by ACR! The plugin will be buggy!");
}
getLogger().info("Found ProtocolLib, enabling checks that use ProtcolLib...");
// Enable packetlisteners
BlinkCheck.startTimer();
BlinkCheck.listenPackets();
KillAuraCheck.listenPackets();
// Check if other AC's are installed
Bukkit.getScheduler().runTaskLater(this, new Runnable() {
@@ -300,4 +302,12 @@ public class AntiCheatReloaded extends JavaPlugin {
Bukkit.getServer().getScheduler().runTask(AntiCheatReloaded.getPlugin(), runnable);
}
public void sendToStaff(String message) {
for (Player player : Bukkit.getOnlinePlayers()) {
if (player.hasPermission("anticheat.system.alert")) {
player.sendMessage(message);
}
}
}
}