From 0b5177f19220e395875a3ee92662f9b440644d4b Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Mon, 25 Jul 2016 09:23:20 +1000 Subject: [PATCH] Minor uuid cache changes --- .../java/com/plotsquared/bukkit/uuid/FileUUIDHandler.java | 3 +-- .../sponge/generator/SpongeAugmentedGenerator.java | 7 ++++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/uuid/FileUUIDHandler.java b/Bukkit/src/main/java/com/plotsquared/bukkit/uuid/FileUUIDHandler.java index 21bfe8972..0542c1f76 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/uuid/FileUUIDHandler.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/uuid/FileUUIDHandler.java @@ -80,8 +80,8 @@ public class FileUUIDHandler extends UUIDHandlerImplementation { e.printStackTrace(); } } + HashBiMap toAdd = HashBiMap.create(new HashMap()); if (Settings.UUID.NATIVE_UUID_PROVIDER) { - HashBiMap toAdd = HashBiMap.create(new HashMap()); HashSet all = UUIDHandler.getAllUUIDS(); PS.debug("&aFast mode UUID caching enabled!"); File playerDataFolder = new File(container, world + File.separator + "playerdata"); @@ -124,7 +124,6 @@ public class FileUUIDHandler extends UUIDHandlerImplementation { PS.debug("Failed to cache: " + all.size() + " uuids - slowly processing all files"); } } - HashBiMap toAdd = HashBiMap.create(new HashMap()); HashSet worlds = Sets.newHashSet(world, "world"); HashSet uuids = new HashSet<>(); HashSet names = new HashSet<>(); diff --git a/Sponge/src/main/java/com/plotsquared/sponge/generator/SpongeAugmentedGenerator.java b/Sponge/src/main/java/com/plotsquared/sponge/generator/SpongeAugmentedGenerator.java index aaa4e65a8..dff40db45 100644 --- a/Sponge/src/main/java/com/plotsquared/sponge/generator/SpongeAugmentedGenerator.java +++ b/Sponge/src/main/java/com/plotsquared/sponge/generator/SpongeAugmentedGenerator.java @@ -4,8 +4,11 @@ import com.flowpowered.math.vector.Vector3i; import com.intellectualcrafters.plot.generator.AugmentedUtils; import com.intellectualcrafters.plot.object.PlotBlock; import com.intellectualcrafters.plot.util.block.DelegateLocalBlockQueue; +import com.plotsquared.sponge.SpongeMain; import com.plotsquared.sponge.util.SpongeUtil; import org.spongepowered.api.block.BlockState; +import org.spongepowered.api.event.cause.Cause; +import org.spongepowered.api.event.cause.NamedCause; import org.spongepowered.api.world.World; import org.spongepowered.api.world.extent.ImmutableBiomeArea; import org.spongepowered.api.world.extent.MutableBlockVolume; @@ -34,7 +37,9 @@ public class SpongeAugmentedGenerator implements GenerationPopulator { populators.add(generator); return generator; } - + + private Cause cause = Cause.of(NamedCause.of("PlotSquared", SpongeMain.THIS)); + @Override public void populate(World world, MutableBlockVolume terrain, ImmutableBiomeArea biome) { Vector3i min = terrain.getBlockMin();