mirror of
				https://github.com/IntellectualSites/PlotSquared.git
				synced 2025-11-04 03:03:43 +01:00 
			
		
		
		
	more bug fixes
This commit is contained in:
		@@ -156,6 +156,7 @@ public enum C {
 | 
			
		||||
    /*
 | 
			
		||||
        Claiming
 | 
			
		||||
     */
 | 
			
		||||
	PLOT_NOT_CLAIMED("&cCannot claim plot"),
 | 
			
		||||
    PLOT_IS_CLAIMED("&cThis plot is already claimed"),
 | 
			
		||||
    CLAIMED("&6You successfully claimed the plot"),
 | 
			
		||||
    /*
 | 
			
		||||
 
 | 
			
		||||
@@ -7,7 +7,7 @@ public class Flag {
 | 
			
		||||
    private String key;
 | 
			
		||||
    private String value;
 | 
			
		||||
    public Flag(String key, String value) {
 | 
			
		||||
        if (!StringUtils.isAlphanumeric(key) || !StringUtils.isAlphanumeric(ChatColor.stripColor(value)))
 | 
			
		||||
        if (!StringUtils.isAlphanumeric(key) || !StringUtils.isAlphanumeric(ChatColor.stripColor(value).replace(" ", "")))
 | 
			
		||||
            throw new IllegalArgumentException("Flag must be alphanumerical");
 | 
			
		||||
        if (key.length()>16)
 | 
			
		||||
            throw new IllegalArgumentException("Key must be <= 16 characters");
 | 
			
		||||
 
 | 
			
		||||
@@ -67,8 +67,8 @@ public class Auto extends SubCommand {
 | 
			
		||||
           id = new PlotId(x,z);
 | 
			
		||||
           if(PlotHelper.getPlot(world, id).owner == null) {
 | 
			
		||||
                Plot plot = PlotHelper.getPlot(world, id);
 | 
			
		||||
                Claim.claimPlot(plr, plot, true);
 | 
			
		||||
                br = true;
 | 
			
		||||
                boolean result = Claim.claimPlot(plr, plot, true);
 | 
			
		||||
                br = result;
 | 
			
		||||
           }
 | 
			
		||||
           if(z < q && (z - x) < q) {
 | 
			
		||||
               z++;
 | 
			
		||||
 
 | 
			
		||||
@@ -11,6 +11,7 @@ package com.intellectualcrafters.plot.commands;
 | 
			
		||||
 | 
			
		||||
import com.intellectualcrafters.plot.*;
 | 
			
		||||
import com.intellectualcrafters.plot.events.PlayerClaimPlotEvent;
 | 
			
		||||
 | 
			
		||||
import org.bukkit.Bukkit;
 | 
			
		||||
import org.bukkit.entity.Player;
 | 
			
		||||
 | 
			
		||||
@@ -40,8 +41,13 @@ public class Claim extends SubCommand{
 | 
			
		||||
            PlayerFunctions.sendMessage(plr, C.PLOT_IS_CLAIMED);
 | 
			
		||||
            return false;
 | 
			
		||||
        }
 | 
			
		||||
        claimPlot(plr, plot, false);
 | 
			
		||||
        boolean result = claimPlot(plr, plot, false);
 | 
			
		||||
        if (!result) {
 | 
			
		||||
            PlayerFunctions.sendMessage(plr, C.PLOT_NOT_CLAIMED);
 | 
			
		||||
            return false;
 | 
			
		||||
        }
 | 
			
		||||
        return true;
 | 
			
		||||
        
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -61,6 +67,7 @@ public class Claim extends SubCommand{
 | 
			
		||||
                SchematicHandler.Schematic schematic = handler.getSchematic(world.SCHEMATIC_FILE);
 | 
			
		||||
                handler.paste(player.getLocation(), schematic, plot);
 | 
			
		||||
            }
 | 
			
		||||
            plot.settings.setFlags(PlotMain.getWorldSettings(player.getWorld()).DEFAULT_FLAGS);
 | 
			
		||||
        }
 | 
			
		||||
        return event.isCancelled();
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user