From 04a835a2820f319b966d61989d794ac39cecfcfc Mon Sep 17 00:00:00 2001 From: Gabriele C Date: Fri, 30 Nov 2018 15:17:54 +0100 Subject: [PATCH] Check server version on startup --- src/main/java/fr/xephi/authme/AuthMe.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/fr/xephi/authme/AuthMe.java b/src/main/java/fr/xephi/authme/AuthMe.java index 744ca0828..003abfe55 100644 --- a/src/main/java/fr/xephi/authme/AuthMe.java +++ b/src/main/java/fr/xephi/authme/AuthMe.java @@ -107,6 +107,13 @@ public class AuthMe extends JavaPlugin { // Load the plugin version data from the plugin description file loadPluginInfo(getDescription().getVersion()); + // Check server version + if (!isClassLoaded("org.bukkit.event.player.PlayerInteractAtEntityEvent")) { + ConsoleLogger.warning("You are running an unsupported server version! AuthMe requires 1.8.X at least!"); + stopOrUnload(); + return; + } + // Prevent running AuthMeBridge due to major exploit issues if (getServer().getPluginManager().isPluginEnabled("AuthMeBridge")) { ConsoleLogger.warning("Detected AuthMeBridge, support for it has been dropped as it was "