mirror of
				https://github.com/IntellectualSites/PlotSquared.git
				synced 2025-11-04 03:03:43 +01:00 
			
		
		
		
	Fixes #293
This commit is contained in:
		@@ -8,7 +8,7 @@
 | 
			
		||||
	    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 | 
			
		||||
	</properties>
 | 
			
		||||
    <artifactId>PlotSquared</artifactId>
 | 
			
		||||
    <version>2.10.1</version>
 | 
			
		||||
    <version>2.10.2</version>
 | 
			
		||||
    <name>PlotSquared</name>
 | 
			
		||||
    <packaging>jar</packaging>
 | 
			
		||||
    <build>
 | 
			
		||||
 
 | 
			
		||||
@@ -53,7 +53,6 @@ public class BukkitCommand implements CommandExecutor, TabCompleter {
 | 
			
		||||
        }
 | 
			
		||||
        String best = new StringComparison(strings[0], commands).getBestMatch();
 | 
			
		||||
        tabOptions.add(best);
 | 
			
		||||
        System.out.print("TAB OPTIONS");
 | 
			
		||||
        final String arg = strings[0].toLowerCase();
 | 
			
		||||
        for (final SubCommand cmd : MainCommand.subCommands) {
 | 
			
		||||
            if (!cmd.cmd.equalsIgnoreCase(best)) {
 | 
			
		||||
 
 | 
			
		||||
@@ -202,16 +202,7 @@ public class AugmentedPopulator extends BlockPopulator {
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        if (this.o) {
 | 
			
		||||
            chunk.load(true);
 | 
			
		||||
            populateBlocks(world, rand, X, Z, x, z, check);
 | 
			
		||||
            TaskManager.runTaskLater(new Runnable() {
 | 
			
		||||
                @Override
 | 
			
		||||
                public void run() {
 | 
			
		||||
                    // Don't need to populate biome with this
 | 
			
		||||
//                    populateBiome(world, x, z); 
 | 
			
		||||
                    MainUtil.update(world.getName(), new ChunkLoc(chunk.getX(), chunk.getZ()));
 | 
			
		||||
                }
 | 
			
		||||
            }, 20);
 | 
			
		||||
        } else {
 | 
			
		||||
            TaskManager.runTaskLater(new Runnable() {
 | 
			
		||||
                @Override
 | 
			
		||||
@@ -224,7 +215,6 @@ public class AugmentedPopulator extends BlockPopulator {
 | 
			
		||||
                public void run() {
 | 
			
		||||
                    chunk.load(true);
 | 
			
		||||
                    populateBlocks(world, rand, X, Z, x, z, check);
 | 
			
		||||
                    MainUtil.update(world.getName(), new ChunkLoc(chunk.getX(), chunk.getZ()));
 | 
			
		||||
                }
 | 
			
		||||
            }, 40 + rand.nextInt(40));
 | 
			
		||||
        }
 | 
			
		||||
@@ -252,7 +242,7 @@ public class AugmentedPopulator extends BlockPopulator {
 | 
			
		||||
                    short id = result[i][j];
 | 
			
		||||
                    final int xx = x + x1;
 | 
			
		||||
                    final int zz = z + z1;
 | 
			
		||||
                    if (check && (((z + z1) < this.bz) || ((z + z1) > this.tz) || ((x + x1) < this.bx) || ((x + x1) > this.tx))) {
 | 
			
		||||
                    if (check && (((zz) < this.bz) || ((zz) > this.tz) || ((xx) < this.bx) || ((xx) > this.tx))) {
 | 
			
		||||
                        continue;
 | 
			
		||||
                    }
 | 
			
		||||
                    if (this.p) {
 | 
			
		||||
@@ -267,6 +257,30 @@ public class AugmentedPopulator extends BlockPopulator {
 | 
			
		||||
                    BukkitSetBlockManager.setBlockManager.set(world, xx, y, zz, id, (byte) 0);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            else {
 | 
			
		||||
                short y_min = y_loc[i][0];
 | 
			
		||||
                if (y_min < 128) {
 | 
			
		||||
                    for (int x1 = x; x1 < x + 16; x1++) {
 | 
			
		||||
                        for (int z1 = z; z1 < z + 16; z1++) {
 | 
			
		||||
                            if (check && (((z1) < this.bz) || ((z1) > this.tz) || ((x1) < this.bx) || ((x1) > this.tx))) {
 | 
			
		||||
                                continue;
 | 
			
		||||
                            }
 | 
			
		||||
                            if (this.p) {
 | 
			
		||||
                                if (ChunkManager.CURRENT_PLOT_CLEAR != null) {
 | 
			
		||||
                                    if (BukkitChunkManager.isIn(ChunkManager.CURRENT_PLOT_CLEAR, x1, z1)) {
 | 
			
		||||
                                        continue;
 | 
			
		||||
                                    }
 | 
			
		||||
                                } else if (this.manager.getPlotIdAbs(this.plotworld, x1, 0, z1) != null) {
 | 
			
		||||
                                    continue;
 | 
			
		||||
                                }
 | 
			
		||||
                            }
 | 
			
		||||
                            for (int y = y_min; y < y_min + 16; y++) {
 | 
			
		||||
                                BukkitSetBlockManager.setBlockManager.set(world, x1, y, z1, 0, (byte) 0);
 | 
			
		||||
                            }
 | 
			
		||||
                        }
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        for (final BlockPopulator populator : this.generator.getDefaultPopulators(world)) {
 | 
			
		||||
            Chunk chunk = world.getChunkAt(X, Z);
 | 
			
		||||
 
 | 
			
		||||
@@ -830,12 +830,10 @@ public class PlayerEvents extends com.intellectualcrafters.plot.listeners.PlotLi
 | 
			
		||||
        }
 | 
			
		||||
        final PlotWorld pW = PlotSquared.getPlotWorld(world);
 | 
			
		||||
        final CreatureSpawnEvent.SpawnReason reason = event.getSpawnReason();
 | 
			
		||||
        System.out.print("REASON: " + reason);
 | 
			
		||||
        if ((reason == CreatureSpawnEvent.SpawnReason.SPAWNER_EGG || reason == CreatureSpawnEvent.SpawnReason.DISPENSE_EGG) && !pW.SPAWN_EGGS) {
 | 
			
		||||
            event.setCancelled(true);
 | 
			
		||||
            return;
 | 
			
		||||
        } else if ((reason == CreatureSpawnEvent.SpawnReason.BREEDING) && !pW.SPAWN_BREEDING) {
 | 
			
		||||
            System.out.print("CANCELLED: " + pW.SPAWN_BREEDING);
 | 
			
		||||
            event.setCancelled(true);
 | 
			
		||||
            return;
 | 
			
		||||
        } else if ((reason == CreatureSpawnEvent.SpawnReason.CUSTOM) && !pW.SPAWN_CUSTOM && !(event.getEntityType().getTypeId() == 30)) {
 | 
			
		||||
 
 | 
			
		||||
@@ -138,8 +138,6 @@ public class UUIDHandler {
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            PlotSquared.log(C.PREFIX.s() + "&6Cached a total of: " + UUIDHandler.uuidMap.size() + " UUIDs");
 | 
			
		||||
            System.out.print(System.currentTimeMillis() - start);
 | 
			
		||||
            System.out.print(Settings.TWIN_MODE_UUID);
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
@@ -213,8 +211,6 @@ public class UUIDHandler {
 | 
			
		||||
        // add the Everyone '*' UUID
 | 
			
		||||
        add(new StringWrapper("*"), DBFunc.everyone);
 | 
			
		||||
        PlotSquared.log(C.PREFIX.s() + "&6Cached a total of: " + UUIDHandler.uuidMap.size() + " UUIDs");
 | 
			
		||||
        System.out.print(System.currentTimeMillis() - start);
 | 
			
		||||
        System.out.print(Settings.TWIN_MODE_UUID);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static UUID getUUID(final PlotPlayer player) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user