diff --git a/pom.xml b/pom.xml
index fe5d5b8b2..5bd9ed5ab 100644
--- a/pom.xml
+++ b/pom.xml
@@ -34,7 +34,7 @@
org.spigotmc
spigot-api
- 1.16.4-R0.1-SNAPSHOT
+ 1.18.1-R0.1-SNAPSHOT
provided
diff --git a/src/main/java/com/gmail/goosius/siegewar/settings/CommentedConfiguration.java b/src/main/java/com/gmail/goosius/siegewar/settings/CommentedConfiguration.java
index 3a145471b..da00f0c21 100644
--- a/src/main/java/com/gmail/goosius/siegewar/settings/CommentedConfiguration.java
+++ b/src/main/java/com/gmail/goosius/siegewar/settings/CommentedConfiguration.java
@@ -46,6 +46,12 @@ public boolean load() {
}
public void save() {
+
+ try {
+ // Spigot 1.18.1 added SnakeYaml's ability to use Comments in yaml.
+ // They have it enabled by default, we need to stop it happening.
+ yamlOptions.setProcessComments(false);
+ } catch (NoSuchMethodError ignored) {}
boolean saved = true;
@@ -206,6 +212,7 @@ public void addComment(String path, String... commentLines) {
comments.put(path, commentstring.toString());
}
+ @SuppressWarnings("deprecation")
@Override
public String saveToString() {
yamlOptions.setIndent(options().indent());