diff options
-rw-r--r-- | spark-paper/build.gradle | 2 | ||||
-rw-r--r-- | spark-paper/src/main/java/me/lucko/spark/paper/PaperWorldInfoProvider.java | 11 |
2 files changed, 7 insertions, 6 deletions
diff --git a/spark-paper/build.gradle b/spark-paper/build.gradle index 4ca3dd6..dde868c 100644 --- a/spark-paper/build.gradle +++ b/spark-paper/build.gradle @@ -15,7 +15,7 @@ tasks.jar { dependencies { implementation project(':spark-common') - compileOnly 'io.papermc.paper:paper-api:1.21-R0.1-SNAPSHOT' + compileOnly 'io.papermc.paper:paper-api:1.21.1-R0.1-SNAPSHOT' } repositories { diff --git a/spark-paper/src/main/java/me/lucko/spark/paper/PaperWorldInfoProvider.java b/spark-paper/src/main/java/me/lucko/spark/paper/PaperWorldInfoProvider.java index 1729a95..4670be1 100644 --- a/spark-paper/src/main/java/me/lucko/spark/paper/PaperWorldInfoProvider.java +++ b/spark-paper/src/main/java/me/lucko/spark/paper/PaperWorldInfoProvider.java @@ -23,6 +23,7 @@ package me.lucko.spark.paper; import me.lucko.spark.common.platform.world.AbstractChunkInfo; import me.lucko.spark.common.platform.world.CountMap; import me.lucko.spark.common.platform.world.WorldInfoProvider; +import net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer; import org.bukkit.Chunk; import org.bukkit.GameRule; import org.bukkit.Server; @@ -107,14 +108,14 @@ public class PaperWorldInfoProvider implements WorldInfoProvider { return data; } - @SuppressWarnings("removal") @Override public Collection<DataPackInfo> pollDataPacks() { - return this.server.getDataPackManager().getDataPacks().stream() + this.server.getDatapackManager().refreshPacks(); + return this.server.getDatapackManager().getPacks().stream() .map(pack -> new DataPackInfo( - pack.getTitle(), - pack.getDescription(), - pack.getSource().name().toLowerCase(Locale.ROOT).replace("_", "") + PlainTextComponentSerializer.plainText().serialize(pack.getTitle()), + PlainTextComponentSerializer.plainText().serialize(pack.getDescription()), + pack.getSource().toString().toLowerCase(Locale.ROOT).replace("_", "") )) .collect(Collectors.toList()); } |