From 56970b85e8669eec4cf40128ce7b79cbb23d56cb Mon Sep 17 00:00:00 2001 From: boy0001 Date: Mon, 27 Jul 2015 04:46:24 +1000 Subject: [PATCH] Refactor --- src/main/java/com/intellectualcrafters/plot/IPlotMain.java | 4 ++-- src/main/java/com/intellectualcrafters/plot/PS.java | 6 +++--- .../generator/{PlotGenerator2.java => PlotGenerator.java} | 4 ++-- src/main/java/com/plotsquared/bukkit/BukkitMain.java | 2 +- .../bukkit/generator/BukkitGeneratorWrapper.java | 6 +++--- .../java/com/plotsquared/sponge/SpongeGeneratorWrapper.java | 4 ++-- 6 files changed, 13 insertions(+), 13 deletions(-) rename src/main/java/com/intellectualcrafters/plot/generator/{PlotGenerator2.java => PlotGenerator.java} (93%) diff --git a/src/main/java/com/intellectualcrafters/plot/IPlotMain.java b/src/main/java/com/intellectualcrafters/plot/IPlotMain.java index aba30386f..0bad7ac2d 100644 --- a/src/main/java/com/intellectualcrafters/plot/IPlotMain.java +++ b/src/main/java/com/intellectualcrafters/plot/IPlotMain.java @@ -7,7 +7,7 @@ import org.bukkit.generator.ChunkGenerator; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.generator.HybridUtils; -import com.intellectualcrafters.plot.generator.PlotGenerator2; +import com.intellectualcrafters.plot.generator.PlotGenerator; import com.plotsquared.bukkit.listeners.APlotListener; import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.util.BlockManager; @@ -71,7 +71,7 @@ public interface IPlotMain { public void unregister(PlotPlayer player); - public PlotGenerator2 getGenerator(String world, String name); + public PlotGenerator getGenerator(String world, String name); public APlotListener initPlotListener(); diff --git a/src/main/java/com/intellectualcrafters/plot/PS.java b/src/main/java/com/intellectualcrafters/plot/PS.java index 2ec317410..33b66f9e1 100644 --- a/src/main/java/com/intellectualcrafters/plot/PS.java +++ b/src/main/java/com/intellectualcrafters/plot/PS.java @@ -46,7 +46,7 @@ import com.intellectualcrafters.plot.flag.FlagValue; import com.intellectualcrafters.plot.generator.ClassicPlotWorld; import com.intellectualcrafters.plot.generator.HybridPlotWorld; import com.intellectualcrafters.plot.generator.HybridUtils; -import com.intellectualcrafters.plot.generator.PlotGenerator2; +import com.intellectualcrafters.plot.generator.PlotGenerator; import com.intellectualcrafters.plot.generator.SquarePlotManager; import com.intellectualcrafters.plot.generator.SquarePlotWorld; import com.plotsquared.bukkit.listeners.APlotListener; @@ -749,7 +749,7 @@ public class PS { * @param world The world to load * @param generator The generator for that world, or null if no generator */ - public void loadWorld(final String world, PlotGenerator2 generator) { + public void loadWorld(final String world, PlotGenerator generator) { PlotWorld plotWorld = getPlotWorld(world); if (plotWorld != null) { if (generator != null) { @@ -758,7 +758,7 @@ public class PS { return; } final Set worlds = (config.contains("worlds") ? config.getConfigurationSection("worlds").getKeys(false) : new HashSet()); - final PlotGenerator2 plotGenerator; + final PlotGenerator plotGenerator; final PlotManager plotManager; final String path = "worlds." + world; if (!LOADING_WORLD && (generator.isFull())) { diff --git a/src/main/java/com/intellectualcrafters/plot/generator/PlotGenerator2.java b/src/main/java/com/intellectualcrafters/plot/generator/PlotGenerator.java similarity index 93% rename from src/main/java/com/intellectualcrafters/plot/generator/PlotGenerator2.java rename to src/main/java/com/intellectualcrafters/plot/generator/PlotGenerator.java index b93cc5250..b642f720b 100644 --- a/src/main/java/com/intellectualcrafters/plot/generator/PlotGenerator2.java +++ b/src/main/java/com/intellectualcrafters/plot/generator/PlotGenerator.java @@ -4,11 +4,11 @@ import com.intellectualcrafters.plot.object.PlotCluster; import com.intellectualcrafters.plot.object.PlotManager; import com.intellectualcrafters.plot.object.PlotWorld; -public abstract class PlotGenerator2 { +public abstract class PlotGenerator { public final String world; public T generator; - public PlotGenerator2(String world, T generator) { + public PlotGenerator(String world, T generator) { this.world = world; this.generator = generator; } diff --git a/src/main/java/com/plotsquared/bukkit/BukkitMain.java b/src/main/java/com/plotsquared/bukkit/BukkitMain.java index 883f84e6a..e4f789fba 100644 --- a/src/main/java/com/plotsquared/bukkit/BukkitMain.java +++ b/src/main/java/com/plotsquared/bukkit/BukkitMain.java @@ -10,7 +10,7 @@ import com.plotsquared.bukkit.database.plotme.LikePlotMeConverter; import com.plotsquared.bukkit.database.plotme.PlotMeConnector_017; import com.intellectualcrafters.plot.flag.FlagManager; import com.intellectualcrafters.plot.generator.BukkitHybridUtils; -import com.intellectualcrafters.plot.generator.PlotGenerator2; +import com.intellectualcrafters.plot.generator.PlotGenerator; import com.plotsquared.bukkit.generator.BukkitGeneratorWrapper; import com.plotsquared.bukkit.generator.BukkitPlotGenerator; import com.plotsquared.bukkit.generator.HybridGen; diff --git a/src/main/java/com/plotsquared/bukkit/generator/BukkitGeneratorWrapper.java b/src/main/java/com/plotsquared/bukkit/generator/BukkitGeneratorWrapper.java index 4b42a1976..64c5072f6 100644 --- a/src/main/java/com/plotsquared/bukkit/generator/BukkitGeneratorWrapper.java +++ b/src/main/java/com/plotsquared/bukkit/generator/BukkitGeneratorWrapper.java @@ -3,12 +3,12 @@ package com.plotsquared.bukkit.generator; import org.bukkit.generator.ChunkGenerator; import com.intellectualcrafters.plot.PS; -import com.intellectualcrafters.plot.generator.PlotGenerator2; +import com.intellectualcrafters.plot.generator.PlotGenerator; import com.intellectualcrafters.plot.object.PlotCluster; import com.intellectualcrafters.plot.object.PlotManager; import com.intellectualcrafters.plot.object.PlotWorld; -public class BukkitGeneratorWrapper extends PlotGenerator2 { +public class BukkitGeneratorWrapper extends PlotGenerator { public final boolean full; @@ -42,7 +42,7 @@ public class BukkitGeneratorWrapper extends PlotGenerator2 { if (gen_string == null) { generator = new HybridGen(world); } else { - PlotGenerator2 gen_wrapper = (PlotGenerator2) PS.get().IMP.getGenerator(world, gen_string); + PlotGenerator gen_wrapper = (PlotGenerator) PS.get().IMP.getGenerator(world, gen_string); if (gen_wrapper != null) { generator = gen_wrapper.generator; } diff --git a/src/main/java/com/plotsquared/sponge/SpongeGeneratorWrapper.java b/src/main/java/com/plotsquared/sponge/SpongeGeneratorWrapper.java index f7cd68f96..b907aee1b 100644 --- a/src/main/java/com/plotsquared/sponge/SpongeGeneratorWrapper.java +++ b/src/main/java/com/plotsquared/sponge/SpongeGeneratorWrapper.java @@ -2,12 +2,12 @@ package com.plotsquared.sponge; import org.spongepowered.api.world.gen.WorldGenerator; -import com.intellectualcrafters.plot.generator.PlotGenerator2; +import com.intellectualcrafters.plot.generator.PlotGenerator; import com.intellectualcrafters.plot.object.PlotCluster; import com.intellectualcrafters.plot.object.PlotManager; import com.intellectualcrafters.plot.object.PlotWorld; -public class SpongeGeneratorWrapper extends PlotGenerator2{ +public class SpongeGeneratorWrapper extends PlotGenerator{ public SpongeGeneratorWrapper(String world, WorldGenerator generator) { super(world, generator);