3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-12-25 02:20:07 +01:00

Ignore datapacks on 1.15

Dieser Commit ist enthalten in:
NotMyFault 2021-08-26 10:47:00 +02:00
Ursprung ee14f7ebb1
Commit 81534b3476
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 158F5701A6AAD00C

Datei anzeigen

@ -26,8 +26,10 @@ import com.fastasyncworldedit.core.util.TaskManager;
import com.fastasyncworldedit.core.util.WEManager;
import com.fastasyncworldedit.core.util.image.ImageViewer;
import com.plotsquared.core.PlotSquared;
import com.sk89q.worldedit.WorldEdit;
import com.sk89q.worldedit.bukkit.BukkitAdapter;
import com.sk89q.worldedit.bukkit.BukkitPlayer;
import com.sk89q.worldedit.extension.platform.Capability;
import com.sk89q.worldedit.internal.util.LogManagerCompat;
import io.papermc.lib.PaperLib;
import io.papermc.paper.datapack.Datapack;
@ -53,12 +55,12 @@ public class FaweBukkit implements IFawe, Listener {
private static final Logger LOGGER = LogManagerCompat.getLogger();
private final Plugin plugin;
private ItemUtil itemUtil;
private boolean listeningImages;
private final boolean chunksStretched;
private final FAWEPlatformAdapterImpl platformAdapter;
private ItemUtil itemUtil;
private boolean listeningImages;
private Preloader preloader;
private volatile boolean keepUnloaded;
public FaweBukkit(Plugin plugin) {
this.plugin = plugin;
@ -130,7 +132,6 @@ public class FaweBukkit implements IFawe, Listener {
return plugin.getDataFolder();
}
public ItemUtil getItemUtil() {
ItemUtil tmp = itemUtil;
if (tmp == null) {
@ -161,7 +162,8 @@ public class FaweBukkit implements IFawe, Listener {
.append(" • Soft Dependencies: ").append(p.getDescription().getSoftDepend()).append("\n")
.append(" • Provides: ").append(p.getDescription().getProvides()).append("\n");
}
if (PaperLib.isPaper()) {
int dataVersion = WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.GAME_HOOKS).getDataVersion();
if (dataVersion >= 2586 && PaperLib.isPaper()) {
Collection<Datapack> datapacks = Bukkit.getServer().getDatapackManager().getEnabledPacks();
msg.append("Enabled Datapacks (").append(datapacks.size()).append("):\n");
for (Datapack dp : datapacks) {
@ -236,8 +238,6 @@ public class FaweBukkit implements IFawe, Listener {
return managers;
}
private volatile boolean keepUnloaded;
@EventHandler(priority = EventPriority.MONITOR)
public void onWorldLoad(WorldLoadEvent event) {
if (keepUnloaded) {