From 178604bbb79325690cd100064a802c2c43670d8d Mon Sep 17 00:00:00 2001 From: Jordan Date: Sat, 29 Jan 2022 13:12:16 +0100 Subject: [PATCH] Only call `org.bukkit.World` height methods if they're present (1.17+) (#1551) * Only call org.bukkit.World height methods if they're present (1.17+) * Switch to WorldEdit get height methods in GPFeature --- .../com/fastasyncworldedit/bukkit/adapter/Regenerator.java | 4 +++- .../bukkit/regions/GriefPreventionFeature.java | 5 +++-- .../main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java | 4 +++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/adapter/Regenerator.java b/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/adapter/Regenerator.java index 576e88aab..84a2f5753 100644 --- a/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/adapter/Regenerator.java +++ b/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/adapter/Regenerator.java @@ -7,6 +7,7 @@ import com.fastasyncworldedit.core.queue.implementation.SingleThreadQueueExtent; import com.fastasyncworldedit.core.util.MathMan; import com.google.common.util.concurrent.ThreadFactoryBuilder; import com.sk89q.worldedit.WorldEditException; +import com.sk89q.worldedit.bukkit.BukkitWorld; import com.sk89q.worldedit.extent.Extent; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.internal.util.LogManagerCompat; @@ -283,7 +284,8 @@ public abstract class Regenerator effects = new HashMap<>();