Skip to content

Commit b9850d0

Browse files
authored
Merge pull request #2 from NoltoxGit/main
Cherry pick from EngineHub/WorldEdit@9164c46
2 parents c7c70fe + c4134ed commit b9850d0

File tree

1 file changed

+10
-2
lines changed
  • worldedit-bukkit/adapters/adapter-1_21_6/src/main/java/com/sk89q/worldedit/bukkit/adapter/ext/fawe/v1_21_6

1 file changed

+10
-2
lines changed

worldedit-bukkit/adapters/adapter-1_21_6/src/main/java/com/sk89q/worldedit/bukkit/adapter/ext/fawe/v1_21_6/PaperweightAdapter.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,14 @@ public final class PaperweightAdapter implements BukkitImplAdapter<net.minecraft
204204

205205
private static final RandomSource random = RandomSource.create();
206206

207+
private static final String WRONG_VERSION =
208+
"""
209+
This version of WorldEdit has not been tested with the current Minecraft version.
210+
While it may work, there might be unexpected issues.
211+
It is recommended to use a version of WorldEdit that supports your Minecraft version.
212+
For more information, see https://worldedit.enginehub.org/en/latest/faq/#bukkit-adapters
213+
""".stripIndent();
214+
207215
// ------------------------------------------------------------------------
208216
// Code that may break between versions of Minecraft
209217
// ------------------------------------------------------------------------
@@ -213,8 +221,8 @@ public PaperweightAdapter() throws NoSuchFieldException, NoSuchMethodException {
213221
CraftServer.class.cast(Bukkit.getServer());
214222

215223
int dataVersion = SharedConstants.getCurrentVersion().dataVersion().version();
216-
if (dataVersion != Constants.DATA_VERSION_MC_1_21_6 && dataVersion != Constants.DATA_VERSION_MC_1_21_7 && dataVersion != Constants.DATA_VERSION_MC_1_21_8) {
217-
throw new UnsupportedClassVersionError("Not 1.21.6, 1.21.7 or 1.21.8!");
224+
if (dataVersion != Constants.DATA_VERSION_MC_1_21_6 && dataVersion != Constants.DATA_VERSION_MC_1_21_7) {
225+
logger.warning(WRONG_VERSION);
218226
}
219227

220228
serverWorldsField = CraftServer.class.getDeclaredField("worlds");

0 commit comments

Comments
 (0)