mirror of
				https://github.com/IntellectualSites/PlotSquared.git
				synced 2025-11-04 03:03:43 +01:00 
			
		
		
		
	fixes #251
This commit is contained in:
		@@ -8,7 +8,7 @@
 | 
			
		||||
	    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 | 
			
		||||
	</properties>
 | 
			
		||||
    <artifactId>PlotSquared</artifactId>
 | 
			
		||||
    <version>2.9.9</version>
 | 
			
		||||
    <version>2.9.11</version>
 | 
			
		||||
    <name>PlotSquared</name>
 | 
			
		||||
    <packaging>jar</packaging>
 | 
			
		||||
    <build>
 | 
			
		||||
 
 | 
			
		||||
@@ -146,6 +146,14 @@ public class PlotSquared {
 | 
			
		||||
        return new LinkedHashSet<>(newplots);
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    public static Set<Plot> getPlotsRaw() {
 | 
			
		||||
        final ArrayList<Plot> newplots = new ArrayList<>();
 | 
			
		||||
        for (final Entry<String, HashMap<PlotId, Plot>> entry : plots.entrySet()) {
 | 
			
		||||
            newplots.addAll(entry.getValue().values());
 | 
			
		||||
        }
 | 
			
		||||
        return new LinkedHashSet<>(newplots);
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    public static ArrayList<Plot> sortPlots(Collection<Plot> plots) {
 | 
			
		||||
        ArrayList<Plot> newPlots = new ArrayList<>();
 | 
			
		||||
        newPlots.addAll(plots);
 | 
			
		||||
 
 | 
			
		||||
@@ -90,7 +90,7 @@ public class Denied extends SubCommand {
 | 
			
		||||
            }
 | 
			
		||||
            final PlotPlayer player = UUIDHandler.getPlayer(uuid);
 | 
			
		||||
            if (!uuid.equals(DBFunc.everyone) && (player != null) && player.isOnline()) {
 | 
			
		||||
                final Plot pl = MainUtil.getPlot(loc);
 | 
			
		||||
                final Plot pl = MainUtil.getPlot(player.getLocation());
 | 
			
		||||
                if ((pl != null) && pl.id.equals(plot.id)) {
 | 
			
		||||
                    MainUtil.sendMessage(player, C.YOU_BE_DENIED);
 | 
			
		||||
                    player.teleport(BlockManager.manager.getSpawn(loc.getWorld()));
 | 
			
		||||
 
 | 
			
		||||
@@ -584,9 +584,9 @@ public class SQLManager implements AbstractDB {
 | 
			
		||||
    public void updateTables() {
 | 
			
		||||
        try {
 | 
			
		||||
            final DatabaseMetaData data = this.connection.getMetaData();
 | 
			
		||||
            ResultSet rs = data.getColumns(null, null, this.prefix + "plot_comments", "plot");
 | 
			
		||||
            ResultSet rs = data.getColumns(null, null, this.prefix + "plot_comments", "plot_plot_id");
 | 
			
		||||
            if (rs.next()) {
 | 
			
		||||
            rs = data.getColumns(null, null, this.prefix + "plot_comments", "hashcode");
 | 
			
		||||
                rs = data.getColumns(null, null, this.prefix + "plot_comments", "hashcode");
 | 
			
		||||
                if (!rs.next()) {
 | 
			
		||||
                    rs.close();
 | 
			
		||||
                    final Statement statement = this.connection.createStatement();
 | 
			
		||||
 
 | 
			
		||||
@@ -67,7 +67,7 @@ public class FlagManager {
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        if (PlotSquared.getAllPlotsRaw() != null) {
 | 
			
		||||
            for (final Plot plot : PlotSquared.getPlots()) {
 | 
			
		||||
            for (final Plot plot : PlotSquared.getPlotsRaw()) {
 | 
			
		||||
                for (final Flag flag : plot.settings.flags) {
 | 
			
		||||
                    if (flag.getAbstractFlag().getKey().equals(af.getKey())) {
 | 
			
		||||
                        flag.setKey(af);
 | 
			
		||||
@@ -319,7 +319,6 @@ public class FlagManager {
 | 
			
		||||
    public static AbstractFlag getFlag(final String string, final boolean create) {
 | 
			
		||||
        if ((getFlag(string) == null) && create) {
 | 
			
		||||
            final AbstractFlag flag = new AbstractFlag(string);
 | 
			
		||||
            addFlag(flag);
 | 
			
		||||
            return flag;
 | 
			
		||||
        }
 | 
			
		||||
        return getFlag(string);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user