From 926ba03eaf8e803269419086ba3bec07688c9bf4 Mon Sep 17 00:00:00 2001 From: MC_XiaoHei Date: Tue, 23 Jul 2024 03:08:25 +0000 Subject: [PATCH] Fix LeavesPluginMeta --- patches/server/0130-Leaves-plugins.patch | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/patches/server/0130-Leaves-plugins.patch b/patches/server/0130-Leaves-plugins.patch index 7a893e23..0b8b0c93 100644 --- a/patches/server/0130-Leaves-plugins.patch +++ b/patches/server/0130-Leaves-plugins.patch @@ -221,10 +221,10 @@ index 0000000000000000000000000000000000000000..35fe2f6a1785d525a46c4bc4d61c5043 \ No newline at end of file diff --git a/src/main/java/org/leavesmc/leaves/plugin/provider/configuration/LeavesPluginMeta.java b/src/main/java/org/leavesmc/leaves/plugin/provider/configuration/LeavesPluginMeta.java new file mode 100644 -index 0000000000000000000000000000000000000000..3b223ca7028317b460fc05e4b7802a1c7eead824 +index 0000000000000000000000000000000000000000..4eb3396fd82e3d32ecb4ee4af4ffa28ab86f34b7 --- /dev/null +++ b/src/main/java/org/leavesmc/leaves/plugin/provider/configuration/LeavesPluginMeta.java -@@ -0,0 +1,91 @@ +@@ -0,0 +1,90 @@ +package org.leavesmc.leaves.plugin.provider.configuration; + +import com.google.common.collect.ImmutableList; @@ -241,7 +241,7 @@ index 0000000000000000000000000000000000000000..3b223ca7028317b460fc05e4b7802a1c +import org.spongepowered.configurate.CommentedConfigurationNode; +import org.spongepowered.configurate.ConfigurateException; +import org.spongepowered.configurate.hocon.HoconConfigurationLoader; -+import org.spongepowered.configurate.loader.HeaderMode; ++import org.spongepowered.configurate.objectmapping.ConfigSerializable; +import org.spongepowered.configurate.objectmapping.ObjectMapper; +import org.spongepowered.configurate.serialize.ScalarSerializer; +import org.spongepowered.configurate.serialize.SerializationException; @@ -251,6 +251,7 @@ index 0000000000000000000000000000000000000000..3b223ca7028317b460fc05e4b7802a1c +import java.util.List; +import java.util.function.Predicate; + ++@ConfigSerializable +public class LeavesPluginMeta extends PaperPluginMeta { + private List mixins; + static final ApiVersion MINIMUM = ApiVersion.getOrCreateVersion("1.21"); @@ -260,7 +261,6 @@ index 0000000000000000000000000000000000000000..3b223ca7028317b460fc05e4b7802a1c + .prettyPrinting(true) + .emitComments(true) + .emitJsonCompatible(true) -+ .headerMode(HeaderMode.NONE) + .source(() -> reader) + .defaultOptions((options) -> + options.serializers((serializers) -> @@ -296,7 +296,6 @@ index 0000000000000000000000000000000000000000..3b223ca7028317b460fc05e4b7802a1c + ) + ) + ) -+ + .build(); + CommentedConfigurationNode node = loader.load(); + LegacyPaperMeta.migrate(node);