diff --git a/plugin/src/main/java/com/denizenscript/denizen/objects/ChunkTag.java b/plugin/src/main/java/com/denizenscript/denizen/objects/ChunkTag.java index d2b8ba213b..bb2413349c 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/objects/ChunkTag.java +++ b/plugin/src/main/java/com/denizenscript/denizen/objects/ChunkTag.java @@ -889,15 +889,21 @@ public void adjust(Mechanism mechanism) { // <--[mechanism] // @object ChunkTag // @name regenerate + // @deprecated This functionality was removed from Spigot and Paper as of 1.21. // @input None // @description + // Deprecated on MC 1.21+. // Causes the chunk to be entirely deleted and reformed from the world's seed. - // At time of writing this method only works as expected on Paper, and will error on Spigot. // @example // - adjust regenerate // --> if (mechanism.matches("regenerate")) { - getBukkitWorld().regenerateChunk(getX(), getZ()); + if (NMSHandler.getVersion().isAtMost(NMSVersion.v1_20)) { + getBukkitWorld().regenerateChunk(getX(), getZ()); + } + else { + BukkitImplDeprecations.chunkRegeneration.warn(mechanism.context); + } } // <--[mechanism] diff --git a/plugin/src/main/java/com/denizenscript/denizen/utilities/BukkitImplDeprecations.java b/plugin/src/main/java/com/denizenscript/denizen/utilities/BukkitImplDeprecations.java index 949a31a77f..feb1cee2f0 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/utilities/BukkitImplDeprecations.java +++ b/plugin/src/main/java/com/denizenscript/denizen/utilities/BukkitImplDeprecations.java @@ -496,6 +496,9 @@ public class BukkitImplDeprecations { // ==================== PAST deprecations of things that are already gone but still have a warning left behind ==================== + // Removed upstream 2025/02/15 + public static Warning chunkRegeneration = new StrongWarning("chunkRegeneration", "The 'ChunkTag.regenerate' mechanism has been deprecated upstream and is no longer supported."); + // Removed upstream 2023/10/29 without warning. public static Warning npcHologramDirection = new StrongWarning("npcHologramDirection", "NPCTag's 'hologram_direction' is deprecated: it was removed from Citizens. Ask in the Citizens channel on the Discord if you need it.");