mirror of
				https://github.com/IntellectualSites/PlotSquared.git
				synced 2025-11-04 03:03:43 +01:00 
			
		
		
		
	If NMF can have midnight work, so can I
This commit is contained in:
		@@ -119,7 +119,7 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain
 | 
			
		||||
 | 
			
		||||
        new PlotSquared(this, "Bukkit");
 | 
			
		||||
 | 
			
		||||
        if (PlotSquared.get().IMP.getServerVersion()[1] < 13) {
 | 
			
		||||
        if (PaperLib.getMinecraftVersion() < 13 && PaperLib.getMinecraftPatchVersion() < 2) {
 | 
			
		||||
            System.out.println(
 | 
			
		||||
                "You can't use this version of PlotSquared on a server less than Minecraft 1.13.2.");
 | 
			
		||||
            System.out
 | 
			
		||||
 
 | 
			
		||||
@@ -932,10 +932,10 @@ import java.util.regex.Pattern;
 | 
			
		||||
        PlotPlayer plotPlayer = BukkitUtil.getPlayer(event.getPlayer());
 | 
			
		||||
        Location location = plotPlayer.getLocation();
 | 
			
		||||
        PlotArea area = location.getPlotArea();
 | 
			
		||||
        if (area == null || (area.PLOT_CHAT == plotPlayer.getAttribute("chat"))) {
 | 
			
		||||
        if (location.isPlotArea() || (area.PLOT_CHAT == plotPlayer.getAttribute("chat"))) {
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
        Plot plot = area.getPlot(location);
 | 
			
		||||
        Plot plot = location.getPlot();
 | 
			
		||||
        if (plot == null) {
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
@@ -14,6 +14,7 @@ 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;
 | 
			
		||||
@@ -276,7 +277,7 @@ public class BukkitChunkManager extends ChunkManager {
 | 
			
		||||
                    }
 | 
			
		||||
                    final LocalBlockQueue queue = GlobalBlockQueue.IMP.getNewQueue(world, false);
 | 
			
		||||
                    if (xxb >= p1x && xxt <= p2x && zzb >= p1z && zzt <= p2z
 | 
			
		||||
                        && PlotSquared.imp().getServerVersion()[1] == 13) {
 | 
			
		||||
                        && PaperLib.getMinecraftVersion() == 13) {
 | 
			
		||||
                        AugmentedUtils
 | 
			
		||||
                            .bypass(ignoreAugment, () -> queue.regenChunkSafe(chunk.x, chunk.z));
 | 
			
		||||
                        continue;
 | 
			
		||||
@@ -391,7 +392,7 @@ public class BukkitChunkManager extends ChunkManager {
 | 
			
		||||
        return BukkitUtil.getWorld(world).getChunkAt(loc.x, loc.z).load(force);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @SuppressWarnings("deprecation") @Override
 | 
			
		||||
    @Override
 | 
			
		||||
    public void unloadChunk(final String world, final ChunkLoc loc, final boolean save,
 | 
			
		||||
        final boolean safe) {
 | 
			
		||||
        if (!PlotSquared.get().isMainThread(Thread.currentThread())) {
 | 
			
		||||
 
 | 
			
		||||
@@ -6,6 +6,7 @@ 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;
 | 
			
		||||
@@ -829,7 +830,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,
 | 
			
		||||
                PlotSquared.get().IMP.getServerVersion()[1] == 13 ? newName : new14Name);
 | 
			
		||||
                PaperLib.getMinecraftVersion() == 13 ? newName : new14Name);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        LegacyBlock(final int numericalId, @NonNull final String legacyName,
 | 
			
		||||
 
 | 
			
		||||
@@ -11,6 +11,7 @@ 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;
 | 
			
		||||
@@ -353,7 +354,7 @@ import java.util.Set;
 | 
			
		||||
            } else if (world.getBlockAt(x, y, z - 1).getType().isSolid()) {
 | 
			
		||||
                facing = BlockFace.SOUTH;
 | 
			
		||||
            }
 | 
			
		||||
            if (PlotSquared.get().IMP.getServerVersion()[1] == 13) {
 | 
			
		||||
            if (PaperLib.getMinecraftVersion() == 13) {
 | 
			
		||||
                block.setType(Material.valueOf("WALL_SIGN"), false);
 | 
			
		||||
            } else {
 | 
			
		||||
                block.setType(Material.valueOf("OAK_WALL_SIGN"), false);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user