From 0ed62b8f90dfe9f8c2b3c87caa0ebb8346109079 Mon Sep 17 00:00:00 2001 From: sk89q Date: Thu, 3 Apr 2014 19:50:05 -0700 Subject: [PATCH] Moved RegionSelector back to regions package to reduce API breakage. --- .../java/com/sk89q/worldedit/bukkit/WorldEditPlugin.java | 2 +- .../com/sk89q/worldedit/bukkit/selections/CuboidSelection.java | 2 +- .../worldedit/bukkit/selections/Polygonal2DSelection.java | 2 +- .../com/sk89q/worldedit/bukkit/selections/RegionSelection.java | 2 +- .../java/com/sk89q/worldedit/bukkit/selections/Selection.java | 2 +- .../com/sk89q/worldedit/forge/selections/CuboidSelection.java | 2 +- .../sk89q/worldedit/forge/selections/Polygonal2DSelection.java | 2 +- .../com/sk89q/worldedit/forge/selections/RegionSelection.java | 2 +- .../java/com/sk89q/worldedit/forge/selections/Selection.java | 2 +- src/main/java/com/sk89q/worldedit/LocalSession.java | 2 +- src/main/java/com/sk89q/worldedit/WorldEdit.java | 2 +- .../java/com/sk89q/worldedit/command/SelectionCommands.java | 2 +- .../java/com/sk89q/worldedit/command/tool/DistanceWand.java | 2 +- .../sk89q/worldedit/regions/{selector => }/RegionSelector.java | 3 +-- .../regions/selector/ConvexPolyhedralRegionSelector.java | 1 + .../sk89q/worldedit/regions/selector/CuboidRegionSelector.java | 1 + .../worldedit/regions/selector/CylinderRegionSelector.java | 1 + .../worldedit/regions/selector/EllipsoidRegionSelector.java | 1 + .../regions/selector/ExtendingCuboidRegionSelector.java | 1 + .../worldedit/regions/selector/Polygonal2DRegionSelector.java | 1 + .../sk89q/worldedit/regions/selector/SphereRegionSelector.java | 1 + src/spout/java/com/sk89q/worldedit/spout/WorldEditPlugin.java | 2 +- .../com/sk89q/worldedit/spout/selections/CuboidSelection.java | 2 +- .../sk89q/worldedit/spout/selections/Polygonal2DSelection.java | 2 +- .../com/sk89q/worldedit/spout/selections/RegionSelection.java | 2 +- .../java/com/sk89q/worldedit/spout/selections/Selection.java | 2 +- 26 files changed, 26 insertions(+), 20 deletions(-) rename src/main/java/com/sk89q/worldedit/regions/{selector => }/RegionSelector.java (97%) diff --git a/src/bukkit/java/com/sk89q/worldedit/bukkit/WorldEditPlugin.java b/src/bukkit/java/com/sk89q/worldedit/bukkit/WorldEditPlugin.java index 7e40652f1..fa490ccf3 100644 --- a/src/bukkit/java/com/sk89q/worldedit/bukkit/WorldEditPlugin.java +++ b/src/bukkit/java/com/sk89q/worldedit/bukkit/WorldEditPlugin.java @@ -29,7 +29,7 @@ import com.sk89q.worldedit.extent.inventory.BlockBag; import com.sk89q.worldedit.regions.CuboidRegion; import com.sk89q.worldedit.regions.Polygonal2DRegion; import com.sk89q.worldedit.regions.Region; -import com.sk89q.worldedit.regions.selector.RegionSelector; +import com.sk89q.worldedit.regions.RegionSelector; import org.bukkit.Bukkit; import org.bukkit.World; import org.bukkit.command.CommandSender; diff --git a/src/bukkit/java/com/sk89q/worldedit/bukkit/selections/CuboidSelection.java b/src/bukkit/java/com/sk89q/worldedit/bukkit/selections/CuboidSelection.java index 1ee663bf7..301ce4044 100644 --- a/src/bukkit/java/com/sk89q/worldedit/bukkit/selections/CuboidSelection.java +++ b/src/bukkit/java/com/sk89q/worldedit/bukkit/selections/CuboidSelection.java @@ -20,7 +20,7 @@ package com.sk89q.worldedit.bukkit.selections; import com.sk89q.worldedit.regions.selector.CuboidRegionSelector; -import com.sk89q.worldedit.regions.selector.RegionSelector; +import com.sk89q.worldedit.regions.RegionSelector; import org.bukkit.Location; import org.bukkit.World; import com.sk89q.worldedit.Vector; diff --git a/src/bukkit/java/com/sk89q/worldedit/bukkit/selections/Polygonal2DSelection.java b/src/bukkit/java/com/sk89q/worldedit/bukkit/selections/Polygonal2DSelection.java index 07476a020..0616d39a6 100644 --- a/src/bukkit/java/com/sk89q/worldedit/bukkit/selections/Polygonal2DSelection.java +++ b/src/bukkit/java/com/sk89q/worldedit/bukkit/selections/Polygonal2DSelection.java @@ -24,7 +24,7 @@ import java.util.List; import com.sk89q.worldedit.LocalWorld; import com.sk89q.worldedit.regions.selector.Polygonal2DRegionSelector; -import com.sk89q.worldedit.regions.selector.RegionSelector; +import com.sk89q.worldedit.regions.RegionSelector; import org.bukkit.World; import com.sk89q.worldedit.BlockVector2D; import com.sk89q.worldedit.bukkit.BukkitUtil; diff --git a/src/bukkit/java/com/sk89q/worldedit/bukkit/selections/RegionSelection.java b/src/bukkit/java/com/sk89q/worldedit/bukkit/selections/RegionSelection.java index 4385c1ba5..82c61ee94 100644 --- a/src/bukkit/java/com/sk89q/worldedit/bukkit/selections/RegionSelection.java +++ b/src/bukkit/java/com/sk89q/worldedit/bukkit/selections/RegionSelection.java @@ -21,7 +21,7 @@ package com.sk89q.worldedit.bukkit.selections; import com.sk89q.worldedit.Vector; import com.sk89q.worldedit.regions.Region; -import com.sk89q.worldedit.regions.selector.RegionSelector; +import com.sk89q.worldedit.regions.RegionSelector; import org.bukkit.Location; import org.bukkit.World; diff --git a/src/bukkit/java/com/sk89q/worldedit/bukkit/selections/Selection.java b/src/bukkit/java/com/sk89q/worldedit/bukkit/selections/Selection.java index 7195047cc..4cf324172 100644 --- a/src/bukkit/java/com/sk89q/worldedit/bukkit/selections/Selection.java +++ b/src/bukkit/java/com/sk89q/worldedit/bukkit/selections/Selection.java @@ -22,7 +22,7 @@ package com.sk89q.worldedit.bukkit.selections; import org.bukkit.Location; import org.bukkit.World; import com.sk89q.worldedit.Vector; -import com.sk89q.worldedit.regions.selector.RegionSelector; +import com.sk89q.worldedit.regions.RegionSelector; public interface Selection { /** diff --git a/src/forge/java/com/sk89q/worldedit/forge/selections/CuboidSelection.java b/src/forge/java/com/sk89q/worldedit/forge/selections/CuboidSelection.java index 2e49242c7..fb4d5f846 100644 --- a/src/forge/java/com/sk89q/worldedit/forge/selections/CuboidSelection.java +++ b/src/forge/java/com/sk89q/worldedit/forge/selections/CuboidSelection.java @@ -7,7 +7,7 @@ import com.sk89q.worldedit.Vector; import com.sk89q.worldedit.forge.WorldEditMod; import com.sk89q.worldedit.regions.CuboidRegion; import com.sk89q.worldedit.regions.selector.CuboidRegionSelector; -import com.sk89q.worldedit.regions.selector.RegionSelector; +import com.sk89q.worldedit.regions.RegionSelector; public class CuboidSelection extends RegionSelection { protected CuboidRegion cuboid; diff --git a/src/forge/java/com/sk89q/worldedit/forge/selections/Polygonal2DSelection.java b/src/forge/java/com/sk89q/worldedit/forge/selections/Polygonal2DSelection.java index 5b46c63b2..89f414778 100644 --- a/src/forge/java/com/sk89q/worldedit/forge/selections/Polygonal2DSelection.java +++ b/src/forge/java/com/sk89q/worldedit/forge/selections/Polygonal2DSelection.java @@ -9,7 +9,7 @@ import com.sk89q.worldedit.LocalWorld; import com.sk89q.worldedit.forge.WorldEditMod; import com.sk89q.worldedit.regions.Polygonal2DRegion; import com.sk89q.worldedit.regions.selector.Polygonal2DRegionSelector; -import com.sk89q.worldedit.regions.selector.RegionSelector; +import com.sk89q.worldedit.regions.RegionSelector; public class Polygonal2DSelection extends RegionSelection { protected Polygonal2DRegion poly2d; diff --git a/src/forge/java/com/sk89q/worldedit/forge/selections/RegionSelection.java b/src/forge/java/com/sk89q/worldedit/forge/selections/RegionSelection.java index a42f391be..b04fb416c 100644 --- a/src/forge/java/com/sk89q/worldedit/forge/selections/RegionSelection.java +++ b/src/forge/java/com/sk89q/worldedit/forge/selections/RegionSelection.java @@ -8,7 +8,7 @@ import com.sk89q.worldedit.Location; import com.sk89q.worldedit.Vector; import com.sk89q.worldedit.forge.WorldEditMod; import com.sk89q.worldedit.regions.Region; -import com.sk89q.worldedit.regions.selector.RegionSelector; +import com.sk89q.worldedit.regions.RegionSelector; public abstract class RegionSelection implements Selection { private WeakReference world; diff --git a/src/forge/java/com/sk89q/worldedit/forge/selections/Selection.java b/src/forge/java/com/sk89q/worldedit/forge/selections/Selection.java index 0c6dfa5ad..815b5a530 100644 --- a/src/forge/java/com/sk89q/worldedit/forge/selections/Selection.java +++ b/src/forge/java/com/sk89q/worldedit/forge/selections/Selection.java @@ -4,7 +4,7 @@ import net.minecraft.world.World; import com.sk89q.worldedit.Location; import com.sk89q.worldedit.Vector; -import com.sk89q.worldedit.regions.selector.RegionSelector; +import com.sk89q.worldedit.regions.RegionSelector; public abstract interface Selection { public abstract Location getMinimumPoint(); diff --git a/src/main/java/com/sk89q/worldedit/LocalSession.java b/src/main/java/com/sk89q/worldedit/LocalSession.java index 591656914..cd6841e2d 100644 --- a/src/main/java/com/sk89q/worldedit/LocalSession.java +++ b/src/main/java/com/sk89q/worldedit/LocalSession.java @@ -34,7 +34,7 @@ import com.sk89q.worldedit.internal.cui.SelectionShapeEvent; import com.sk89q.worldedit.masks.Mask; import com.sk89q.worldedit.regions.selector.CuboidRegionSelector; import com.sk89q.worldedit.regions.Region; -import com.sk89q.worldedit.regions.selector.RegionSelector; +import com.sk89q.worldedit.regions.RegionSelector; import com.sk89q.worldedit.session.request.Request; import com.sk89q.worldedit.world.snapshot.Snapshot; diff --git a/src/main/java/com/sk89q/worldedit/WorldEdit.java b/src/main/java/com/sk89q/worldedit/WorldEdit.java index fba9db2e9..295063e8e 100644 --- a/src/main/java/com/sk89q/worldedit/WorldEdit.java +++ b/src/main/java/com/sk89q/worldedit/WorldEdit.java @@ -39,7 +39,7 @@ import com.sk89q.worldedit.function.pattern.Patterns; import com.sk89q.worldedit.internal.InternalEditSessionFactory; import com.sk89q.worldedit.masks.Mask; import com.sk89q.worldedit.patterns.Pattern; -import com.sk89q.worldedit.regions.selector.RegionSelector; +import com.sk89q.worldedit.regions.RegionSelector; import com.sk89q.worldedit.scripting.CraftScriptContext; import com.sk89q.worldedit.scripting.CraftScriptEngine; import com.sk89q.worldedit.scripting.RhinoCraftScriptEngine; diff --git a/src/main/java/com/sk89q/worldedit/command/SelectionCommands.java b/src/main/java/com/sk89q/worldedit/command/SelectionCommands.java index 6487909ca..5b6ef04f7 100644 --- a/src/main/java/com/sk89q/worldedit/command/SelectionCommands.java +++ b/src/main/java/com/sk89q/worldedit/command/SelectionCommands.java @@ -52,7 +52,7 @@ import com.sk89q.worldedit.regions.selector.ExtendingCuboidRegionSelector; import com.sk89q.worldedit.regions.selector.Polygonal2DRegionSelector; import com.sk89q.worldedit.regions.Region; import com.sk89q.worldedit.regions.RegionOperationException; -import com.sk89q.worldedit.regions.selector.RegionSelector; +import com.sk89q.worldedit.regions.RegionSelector; import com.sk89q.worldedit.regions.selector.SphereRegionSelector; /** diff --git a/src/main/java/com/sk89q/worldedit/command/tool/DistanceWand.java b/src/main/java/com/sk89q/worldedit/command/tool/DistanceWand.java index 797da0155..b34505e31 100644 --- a/src/main/java/com/sk89q/worldedit/command/tool/DistanceWand.java +++ b/src/main/java/com/sk89q/worldedit/command/tool/DistanceWand.java @@ -20,7 +20,7 @@ package com.sk89q.worldedit.command.tool; import com.sk89q.worldedit.*; -import com.sk89q.worldedit.regions.selector.RegionSelector; +import com.sk89q.worldedit.regions.RegionSelector; /** * A wand that can be used at a distance. diff --git a/src/main/java/com/sk89q/worldedit/regions/selector/RegionSelector.java b/src/main/java/com/sk89q/worldedit/regions/RegionSelector.java similarity index 97% rename from src/main/java/com/sk89q/worldedit/regions/selector/RegionSelector.java rename to src/main/java/com/sk89q/worldedit/regions/RegionSelector.java index 243657a64..b45e3e5e5 100644 --- a/src/main/java/com/sk89q/worldedit/regions/selector/RegionSelector.java +++ b/src/main/java/com/sk89q/worldedit/regions/RegionSelector.java @@ -17,10 +17,9 @@ * along with this program. If not, see . */ -package com.sk89q.worldedit.regions.selector; +package com.sk89q.worldedit.regions; import com.sk89q.worldedit.*; -import com.sk89q.worldedit.regions.Region; import java.util.List; diff --git a/src/main/java/com/sk89q/worldedit/regions/selector/ConvexPolyhedralRegionSelector.java b/src/main/java/com/sk89q/worldedit/regions/selector/ConvexPolyhedralRegionSelector.java index d28cef9dd..2d9b22a66 100644 --- a/src/main/java/com/sk89q/worldedit/regions/selector/ConvexPolyhedralRegionSelector.java +++ b/src/main/java/com/sk89q/worldedit/regions/selector/ConvexPolyhedralRegionSelector.java @@ -38,6 +38,7 @@ import com.sk89q.worldedit.internal.cui.SelectionPolygonEvent; import com.sk89q.worldedit.internal.cui.SelectionShapeEvent; import com.sk89q.worldedit.regions.ConvexPolyhedralRegion; import com.sk89q.worldedit.regions.Region; +import com.sk89q.worldedit.regions.RegionSelector; import com.sk89q.worldedit.regions.polyhedron.Triangle; public class ConvexPolyhedralRegionSelector implements RegionSelector, CUIRegion { diff --git a/src/main/java/com/sk89q/worldedit/regions/selector/CuboidRegionSelector.java b/src/main/java/com/sk89q/worldedit/regions/selector/CuboidRegionSelector.java index c5494e141..6947ccded 100644 --- a/src/main/java/com/sk89q/worldedit/regions/selector/CuboidRegionSelector.java +++ b/src/main/java/com/sk89q/worldedit/regions/selector/CuboidRegionSelector.java @@ -31,6 +31,7 @@ import com.sk89q.worldedit.internal.cui.CUIRegion; import com.sk89q.worldedit.internal.cui.SelectionPointEvent; import com.sk89q.worldedit.regions.CuboidRegion; import com.sk89q.worldedit.regions.Region; +import com.sk89q.worldedit.regions.RegionSelector; /** * Selector for cuboids. diff --git a/src/main/java/com/sk89q/worldedit/regions/selector/CylinderRegionSelector.java b/src/main/java/com/sk89q/worldedit/regions/selector/CylinderRegionSelector.java index 316e04c0e..1a2369c25 100644 --- a/src/main/java/com/sk89q/worldedit/regions/selector/CylinderRegionSelector.java +++ b/src/main/java/com/sk89q/worldedit/regions/selector/CylinderRegionSelector.java @@ -35,6 +35,7 @@ import com.sk89q.worldedit.internal.cui.SelectionPointEvent; import com.sk89q.worldedit.internal.cui.SelectionShapeEvent; import com.sk89q.worldedit.regions.CylinderRegion; import com.sk89q.worldedit.regions.Region; +import com.sk89q.worldedit.regions.RegionSelector; import java.text.NumberFormat; diff --git a/src/main/java/com/sk89q/worldedit/regions/selector/EllipsoidRegionSelector.java b/src/main/java/com/sk89q/worldedit/regions/selector/EllipsoidRegionSelector.java index 0db43366b..57755c619 100644 --- a/src/main/java/com/sk89q/worldedit/regions/selector/EllipsoidRegionSelector.java +++ b/src/main/java/com/sk89q/worldedit/regions/selector/EllipsoidRegionSelector.java @@ -32,6 +32,7 @@ import com.sk89q.worldedit.internal.cui.SelectionEllipsoidPointEvent; import com.sk89q.worldedit.internal.cui.SelectionPointEvent; import com.sk89q.worldedit.regions.EllipsoidRegion; import com.sk89q.worldedit.regions.Region; +import com.sk89q.worldedit.regions.RegionSelector; /** * Selector for ellipsoids. diff --git a/src/main/java/com/sk89q/worldedit/regions/selector/ExtendingCuboidRegionSelector.java b/src/main/java/com/sk89q/worldedit/regions/selector/ExtendingCuboidRegionSelector.java index 8c1993bf3..3425ae69a 100644 --- a/src/main/java/com/sk89q/worldedit/regions/selector/ExtendingCuboidRegionSelector.java +++ b/src/main/java/com/sk89q/worldedit/regions/selector/ExtendingCuboidRegionSelector.java @@ -24,6 +24,7 @@ import com.sk89q.worldedit.LocalPlayer; import com.sk89q.worldedit.LocalSession; import com.sk89q.worldedit.LocalWorld; import com.sk89q.worldedit.Vector; +import com.sk89q.worldedit.regions.RegionSelector; /** * Alternative selector for cuboids. diff --git a/src/main/java/com/sk89q/worldedit/regions/selector/Polygonal2DRegionSelector.java b/src/main/java/com/sk89q/worldedit/regions/selector/Polygonal2DRegionSelector.java index 9ad1896fa..f7ef779ef 100644 --- a/src/main/java/com/sk89q/worldedit/regions/selector/Polygonal2DRegionSelector.java +++ b/src/main/java/com/sk89q/worldedit/regions/selector/Polygonal2DRegionSelector.java @@ -34,6 +34,7 @@ import com.sk89q.worldedit.internal.cui.SelectionPoint2DEvent; import com.sk89q.worldedit.internal.cui.SelectionShapeEvent; import com.sk89q.worldedit.regions.Polygonal2DRegion; import com.sk89q.worldedit.regions.Region; +import com.sk89q.worldedit.regions.RegionSelector; /** * Selector for polygonal regions. diff --git a/src/main/java/com/sk89q/worldedit/regions/selector/SphereRegionSelector.java b/src/main/java/com/sk89q/worldedit/regions/selector/SphereRegionSelector.java index 22da10935..d5b5f5513 100644 --- a/src/main/java/com/sk89q/worldedit/regions/selector/SphereRegionSelector.java +++ b/src/main/java/com/sk89q/worldedit/regions/selector/SphereRegionSelector.java @@ -23,6 +23,7 @@ import com.sk89q.worldedit.LocalPlayer; import com.sk89q.worldedit.LocalSession; import com.sk89q.worldedit.LocalWorld; import com.sk89q.worldedit.Vector; +import com.sk89q.worldedit.regions.RegionSelector; /** * Selector for spheres. diff --git a/src/spout/java/com/sk89q/worldedit/spout/WorldEditPlugin.java b/src/spout/java/com/sk89q/worldedit/spout/WorldEditPlugin.java index 05b63ebc6..de2a46085 100644 --- a/src/spout/java/com/sk89q/worldedit/spout/WorldEditPlugin.java +++ b/src/spout/java/com/sk89q/worldedit/spout/WorldEditPlugin.java @@ -27,7 +27,7 @@ import com.sk89q.worldedit.extent.inventory.BlockBag; import com.sk89q.worldedit.regions.CuboidRegion; import com.sk89q.worldedit.regions.Polygonal2DRegion; import com.sk89q.worldedit.regions.Region; -import com.sk89q.worldedit.regions.selector.RegionSelector; +import com.sk89q.worldedit.regions.RegionSelector; import com.sk89q.worldedit.spout.selections.CuboidSelection; import com.sk89q.worldedit.spout.selections.Polygonal2DSelection; import com.sk89q.worldedit.spout.selections.Selection; diff --git a/src/spout/java/com/sk89q/worldedit/spout/selections/CuboidSelection.java b/src/spout/java/com/sk89q/worldedit/spout/selections/CuboidSelection.java index c13aba856..0707d28e2 100644 --- a/src/spout/java/com/sk89q/worldedit/spout/selections/CuboidSelection.java +++ b/src/spout/java/com/sk89q/worldedit/spout/selections/CuboidSelection.java @@ -25,7 +25,7 @@ import com.sk89q.worldedit.Vector; import com.sk89q.worldedit.spout.SpoutUtil; import com.sk89q.worldedit.regions.CuboidRegion; import com.sk89q.worldedit.regions.selector.CuboidRegionSelector; -import com.sk89q.worldedit.regions.selector.RegionSelector; +import com.sk89q.worldedit.regions.RegionSelector; import org.spout.api.geo.World; import org.spout.api.geo.discrete.Point; diff --git a/src/spout/java/com/sk89q/worldedit/spout/selections/Polygonal2DSelection.java b/src/spout/java/com/sk89q/worldedit/spout/selections/Polygonal2DSelection.java index 6bc1045b4..fadd015b0 100644 --- a/src/spout/java/com/sk89q/worldedit/spout/selections/Polygonal2DSelection.java +++ b/src/spout/java/com/sk89q/worldedit/spout/selections/Polygonal2DSelection.java @@ -25,7 +25,7 @@ import com.sk89q.worldedit.BlockVector2D; import com.sk89q.worldedit.LocalWorld; import com.sk89q.worldedit.regions.Polygonal2DRegion; import com.sk89q.worldedit.regions.selector.Polygonal2DRegionSelector; -import com.sk89q.worldedit.regions.selector.RegionSelector; +import com.sk89q.worldedit.regions.RegionSelector; import com.sk89q.worldedit.spout.SpoutUtil; import org.spout.api.geo.World; diff --git a/src/spout/java/com/sk89q/worldedit/spout/selections/RegionSelection.java b/src/spout/java/com/sk89q/worldedit/spout/selections/RegionSelection.java index 38c810c8b..8b49063f2 100644 --- a/src/spout/java/com/sk89q/worldedit/spout/selections/RegionSelection.java +++ b/src/spout/java/com/sk89q/worldedit/spout/selections/RegionSelection.java @@ -23,7 +23,7 @@ package com.sk89q.worldedit.spout.selections; import com.sk89q.worldedit.Vector; import com.sk89q.worldedit.regions.Region; -import com.sk89q.worldedit.regions.selector.RegionSelector; +import com.sk89q.worldedit.regions.RegionSelector; import com.sk89q.worldedit.spout.SpoutUtil; import org.spout.api.geo.World; import org.spout.api.geo.discrete.Point; diff --git a/src/spout/java/com/sk89q/worldedit/spout/selections/Selection.java b/src/spout/java/com/sk89q/worldedit/spout/selections/Selection.java index cf3a054e0..5f83c5712 100644 --- a/src/spout/java/com/sk89q/worldedit/spout/selections/Selection.java +++ b/src/spout/java/com/sk89q/worldedit/spout/selections/Selection.java @@ -22,7 +22,7 @@ package com.sk89q.worldedit.spout.selections; import com.sk89q.worldedit.Vector; -import com.sk89q.worldedit.regions.selector.RegionSelector; +import com.sk89q.worldedit.regions.RegionSelector; import org.spout.api.geo.World; import org.spout.api.geo.discrete.Point;