From 0ca69d4f03be11932aee38d1ef64c64ce6807576 Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Mon, 19 Aug 2019 20:39:03 +0100 Subject: [PATCH] Don't use PaperLib I guess --- .../intellectualsites/plotsquared/bukkit/BukkitMain.java | 2 +- .../plotsquared/bukkit/util/BukkitChunkManager.java | 3 +-- .../plotsquared/bukkit/util/BukkitLegacyMappings.java | 3 +-- .../intellectualsites/plotsquared/bukkit/util/BukkitUtil.java | 3 +-- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/BukkitMain.java b/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/BukkitMain.java index 15e1ef219..6e0587fdb 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/BukkitMain.java +++ b/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/BukkitMain.java @@ -119,7 +119,7 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain new PlotSquared(this, "Bukkit"); - if (PaperLib.getMinecraftVersion() < 13 && PaperLib.getMinecraftPatchVersion() < 2) { + if (PlotSquared.get().IMP.getServerVersion()[1] < 13) { System.out.println( "You can't use this version of PlotSquared on a server less than Minecraft 1.13.2."); System.out diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitChunkManager.java b/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitChunkManager.java index 9049df000..a9c6b2518 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitChunkManager.java +++ b/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitChunkManager.java @@ -14,7 +14,6 @@ import com.github.intellectualsites.plotsquared.plot.util.block.ScopedLocalBlock import com.sk89q.worldedit.bukkit.BukkitWorld; import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.world.block.BaseBlock; -import io.papermc.lib.PaperLib; import org.bukkit.Bukkit; import org.bukkit.Chunk; import org.bukkit.World; @@ -277,7 +276,7 @@ public class BukkitChunkManager extends ChunkManager { } final LocalBlockQueue queue = GlobalBlockQueue.IMP.getNewQueue(world, false); if (xxb >= p1x && xxt <= p2x && zzb >= p1z && zzt <= p2z - && PaperLib.getMinecraftVersion() == 13) { + && PlotSquared.imp().getServerVersion()[1] == 13) { AugmentedUtils .bypass(ignoreAugment, () -> queue.regenChunkSafe(chunk.x, chunk.z)); continue; diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitLegacyMappings.java b/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitLegacyMappings.java index bc18271db..0331e948a 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitLegacyMappings.java +++ b/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitLegacyMappings.java @@ -6,7 +6,6 @@ import com.github.intellectualsites.plotsquared.plot.object.PlotBlock; import com.github.intellectualsites.plotsquared.plot.object.StringPlotBlock; import com.github.intellectualsites.plotsquared.plot.util.LegacyMappings; import com.github.intellectualsites.plotsquared.plot.util.StringComparison; -import io.papermc.lib.PaperLib; import lombok.AccessLevel; import lombok.EqualsAndHashCode; import lombok.Getter; @@ -830,7 +829,7 @@ public final class BukkitLegacyMappings extends LegacyMappings { LegacyBlock(final int numericalId, final int dataValue, @NonNull final String legacyName, @NonNull final String newName, @NonNull final String new14Name) { this(numericalId, dataValue, legacyName, - PaperLib.getMinecraftVersion() == 13 ? newName : new14Name); + PlotSquared.get().IMP.getServerVersion()[1] == 13 ? newName : new14Name); } LegacyBlock(final int numericalId, @NonNull final String legacyName, diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitUtil.java b/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitUtil.java index 0ba9c5700..6d7069c98 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitUtil.java +++ b/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitUtil.java @@ -11,7 +11,6 @@ import com.github.intellectualsites.plotsquared.plot.util.StringComparison; import com.github.intellectualsites.plotsquared.plot.util.UUIDHandler; import com.github.intellectualsites.plotsquared.plot.util.WorldUtil; import com.sk89q.worldedit.bukkit.BukkitWorld; -import io.papermc.lib.PaperLib; import lombok.NonNull; import org.bukkit.Bukkit; import org.bukkit.Material; @@ -355,7 +354,7 @@ import java.util.Set; } else if (world.getBlockAt(x, y, z - 1).getType().isSolid()) { facing = BlockFace.SOUTH; } - if (PaperLib.getMinecraftVersion() == 13) { + if (PlotSquared.get().IMP.getServerVersion()[1] == 13) { block.setType(Material.valueOf("WALL_SIGN"), false); } else if (PaperLib.getMinecraftVersion() == 14) { block.setType(Material.OAK_WALL_SIGN, false);