diff --git a/worldguard-legacy/src/main/java/com/sk89q/worldguard/bukkit/ConfigurationManager.java b/worldguard-legacy/src/main/java/com/sk89q/worldguard/bukkit/ConfigurationManager.java index 7c08295b..bdadad89 100644 --- a/worldguard-legacy/src/main/java/com/sk89q/worldguard/bukkit/ConfigurationManager.java +++ b/worldguard-legacy/src/main/java/com/sk89q/worldguard/bukkit/ConfigurationManager.java @@ -91,6 +91,7 @@ public class ConfigurationManager { public boolean keepUnresolvedNames; @Unreported public Map hostKeys = new HashMap(); + public boolean hostKeysAllowFMLClients; /** * Region Storage Configuration method, and config values @@ -169,6 +170,7 @@ public void load() { hostKeys.put(key.toLowerCase(), value); } } + hostKeysAllowFMLClients = config.getBoolean("security.host-keys-allow-forge-clients", false); // ==================================================================== // Region store drivers diff --git a/worldguard-legacy/src/main/java/com/sk89q/worldguard/bukkit/listener/WorldGuardPlayerListener.java b/worldguard-legacy/src/main/java/com/sk89q/worldguard/bukkit/listener/WorldGuardPlayerListener.java index 537c68f6..05087c35 100644 --- a/worldguard-legacy/src/main/java/com/sk89q/worldguard/bukkit/listener/WorldGuardPlayerListener.java +++ b/worldguard-legacy/src/main/java/com/sk89q/worldguard/bukkit/listener/WorldGuardPlayerListener.java @@ -183,7 +183,8 @@ public void onPlayerLogin(PlayerLoginEvent event) { hostname = hostname.substring(0, colonIndex); } - if (!hostname.equals(hostKey)) { + if (!hostname.equals(hostKey) + && !(cfg.hostKeysAllowFMLClients && hostname.equals(hostKey + "\u0000FML\u0000"))) { event.disallow(PlayerLoginEvent.Result.KICK_OTHER, "You did not join with the valid host key!"); log.warning("WorldGuard host key check: " +