From 405de477d314623d644c20bc63b55f6c13d7a1c9 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Tue, 11 Jan 2022 19:28:18 -0800 Subject: [PATCH] (thanks chew) Fix older MC versions not loading config files Fixes #4716 --- src/main/java/com/gmail/nossr50/config/BukkitConfig.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/config/BukkitConfig.java b/src/main/java/com/gmail/nossr50/config/BukkitConfig.java index 4feef929e..ecc4fd60d 100644 --- a/src/main/java/com/gmail/nossr50/config/BukkitConfig.java +++ b/src/main/java/com/gmail/nossr50/config/BukkitConfig.java @@ -62,7 +62,14 @@ public abstract class BukkitConfig { mcMMO.p.getLogger().info("[config] Loading config from disk: " + fileName); YamlConfiguration config = new YamlConfiguration(); config.options().indent(4); - config.options().parseComments(true); + + try { + config.options().parseComments(true); + } catch (NoSuchMethodError e) { + //e.printStackTrace(); + mcMMO.p.getLogger().severe("Your Spigot/CraftBukkit API is out of date, update your server software!"); + } + config.options().copyDefaults(true); try {