mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-01 14:38:56 +00:00
Update for CB 1.4.5-R1.0 RB, add compatibility test to prevent use of outdated builds.
USE THIS BUILD AS A TEST FOR AC 1.5 RELEASE.
This commit is contained in:
1 parent
e59cbdee65
commit
ced8782a15
2 files changed
+18
-3
No files matched your search
@@ -38,6 +38,7 @@ import net.h31ix.anticheat.util.Utilities;
|
||||
import net.h31ix.anticheat.xray.XRayListener;
|
||||
import net.h31ix.anticheat.xray.XRayTracker;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
@@ -71,6 +72,20 @@ public class Anticheat extends JavaPlugin
|
||||
setupUpdater();
|
||||
setupMetrics();
|
||||
restoreLevels();
|
||||
// Test for compatibility for 1.4.5-R1.0
|
||||
try
|
||||
{
|
||||
Material.AIR.isSolid();
|
||||
}
|
||||
catch(NoSuchMethodError error)
|
||||
{
|
||||
getLogger().severe("You are using an outdated version of CraftBukkit that does not contain the API required for AntiCheat to run properly.");
|
||||
getLogger().severe("Please update to CraftBukkit 1.4.5-R1.0 or higher by visiting dl.bukkit.org and hitting the green download button.");
|
||||
getLogger().severe("AntiCheat will now be disabled, and will not protect your server until it is updated.");
|
||||
getPluginLoader().disablePlugin(this);
|
||||
return;
|
||||
}
|
||||
// End test
|
||||
if (verbose)
|
||||
{
|
||||
getLogger().log(Level.INFO, "Finished loading.");
|
||||
|
||||
Reference in new issue
Block a user