mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2024-11-20 01:05:52 +01:00
Support other WorldEdit versions.
This commit is contained in:
parent
bdcd3d36be
commit
febf598aa3
@ -4,6 +4,7 @@ import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.utils.version.NMSUtil;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.plugin.PluginManager;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
@ -14,7 +15,8 @@ import java.lang.reflect.Method;
|
||||
public class SchematicUtil {
|
||||
|
||||
public static Float[] pasteSchematic(File schematicFile, org.bukkit.Location location) {
|
||||
if (!Bukkit.getPluginManager().isPluginEnabled("WorldEdit"))
|
||||
PluginManager pluginManager = Bukkit.getPluginManager();
|
||||
if (!pluginManager.isPluginEnabled("WorldEdit") && !pluginManager.isPluginEnabled("AsyncWorldEdit") && !pluginManager.isPluginEnabled("FastAsyncWorldEdit"))
|
||||
throw new IllegalStateException("Tried to generate an island using a schematic file without WorldEdit installed!");
|
||||
|
||||
Runnable pasteTask = () -> {
|
||||
|
Loading…
Reference in New Issue
Block a user