From c0d13e9b7df96d34e1367437c9b21940a8b7566f Mon Sep 17 00:00:00 2001 From: zml2008 Date: Sun, 8 Jan 2012 17:05:35 -0800 Subject: [PATCH] Updated for package changes in SpoutAPI --- pom.xml | 2 +- .../sk89q/worldedit/spout/SessionTimer.java | 4 ++-- .../worldedit/spout/SpoutCommandSender.java | 6 ++--- .../sk89q/worldedit/spout/SpoutPlayer.java | 17 +++++++------- .../worldedit/spout/SpoutPlayerBlockBag.java | 6 ++--- .../spout/SpoutRawCommandExecutor.java | 8 +++---- .../worldedit/spout/SpoutServerInterface.java | 10 ++++----- .../com/sk89q/worldedit/spout/SpoutUtil.java | 16 +++++++------- .../com/sk89q/worldedit/spout/SpoutWorld.java | 4 ++-- .../spout/WorldEditPlayerListener.java | 22 +++++++++---------- .../worldedit/spout/WorldEditPlugin.java | 10 ++++----- .../spout/selections/CuboidSelection.java | 4 ++-- .../selections/Polygonal2DSelection.java | 2 +- .../spout/selections/RegionSelection.java | 4 ++-- .../worldedit/spout/selections/Selection.java | 4 ++-- 15 files changed, 59 insertions(+), 60 deletions(-) diff --git a/pom.xml b/pom.xml index 483e4edb4..e6e1dae02 100644 --- a/pom.xml +++ b/pom.xml @@ -86,7 +86,7 @@ - org.getspout + org.spout spoutapi dev-SNAPSHOT diff --git a/src/main/java/com/sk89q/worldedit/spout/SessionTimer.java b/src/main/java/com/sk89q/worldedit/spout/SessionTimer.java index fdfa3cb2d..504e27d55 100644 --- a/src/main/java/com/sk89q/worldedit/spout/SessionTimer.java +++ b/src/main/java/com/sk89q/worldedit/spout/SessionTimer.java @@ -21,8 +21,8 @@ package com.sk89q.worldedit.spout; import com.sk89q.worldedit.SessionCheck; import com.sk89q.worldedit.WorldEdit; -import org.getspout.api.Game; -import org.getspout.api.player.Player; +import org.spout.api.Game; +import org.spout.api.player.Player; /** * Used to remove expired sessions in Bukkit. diff --git a/src/main/java/com/sk89q/worldedit/spout/SpoutCommandSender.java b/src/main/java/com/sk89q/worldedit/spout/SpoutCommandSender.java index 5f912474c..14b3f1468 100644 --- a/src/main/java/com/sk89q/worldedit/spout/SpoutCommandSender.java +++ b/src/main/java/com/sk89q/worldedit/spout/SpoutCommandSender.java @@ -7,9 +7,9 @@ import com.sk89q.worldedit.ServerInterface; import com.sk89q.worldedit.Vector; import com.sk89q.worldedit.WorldVector; import com.sk89q.worldedit.bags.BlockBag; -import org.getspout.api.ChatColor; -import org.getspout.api.command.CommandSource; -import org.getspout.api.player.Player; +import org.spout.api.ChatColor; +import org.spout.api.command.CommandSource; +import org.spout.api.player.Player; public class SpoutCommandSender extends LocalPlayer { private CommandSource sender; diff --git a/src/main/java/com/sk89q/worldedit/spout/SpoutPlayer.java b/src/main/java/com/sk89q/worldedit/spout/SpoutPlayer.java index c83a5be09..4400f9e04 100644 --- a/src/main/java/com/sk89q/worldedit/spout/SpoutPlayer.java +++ b/src/main/java/com/sk89q/worldedit/spout/SpoutPlayer.java @@ -27,13 +27,12 @@ import com.sk89q.worldedit.Vector; import com.sk89q.worldedit.WorldVector; import com.sk89q.worldedit.bags.BlockBag; import com.sk89q.worldedit.cui.CUIEvent; -import org.getspout.api.geo.discrete.Point; -import org.getspout.api.geo.discrete.Transform; -import org.getspout.api.inventory.ItemStack; -import org.getspout.api.math.MathHelper; -import org.getspout.api.math.Quaternion; -import org.getspout.api.math.Vector3; -import org.getspout.api.player.Player; +import org.spout.api.geo.discrete.Point; +import org.spout.api.geo.discrete.Transform; +import org.spout.api.inventory.ItemStack; +import org.spout.api.math.Quaternion; +import org.spout.api.math.Vector3; +import org.spout.api.player.Player; public class SpoutPlayer extends LocalPlayer { private Player player; @@ -66,12 +65,12 @@ public class SpoutPlayer extends LocalPlayer { @Override public double getPitch() { - return MathHelper.getDirectionVector(player.getEntity().getTransform().getRotation()).getY(); + return player.getEntity().getTransform().getRotation().getAxisAngles().getY(); } @Override public double getYaw() { - return MathHelper.getDirectionVector(player.getEntity().getTransform().getRotation()).getZ(); + return player.getEntity().getTransform().getRotation().getAxisAngles().getZ(); } @Override diff --git a/src/main/java/com/sk89q/worldedit/spout/SpoutPlayerBlockBag.java b/src/main/java/com/sk89q/worldedit/spout/SpoutPlayerBlockBag.java index 746a1441a..5848ff564 100644 --- a/src/main/java/com/sk89q/worldedit/spout/SpoutPlayerBlockBag.java +++ b/src/main/java/com/sk89q/worldedit/spout/SpoutPlayerBlockBag.java @@ -28,9 +28,9 @@ import com.sk89q.worldedit.blocks.BaseItem; import com.sk89q.worldedit.blocks.BaseItemStack; import com.sk89q.worldedit.blocks.BlockID; import com.sk89q.worldedit.blocks.ItemType; -import org.getspout.api.inventory.ItemStack; -import org.getspout.api.material.MaterialData; -import org.getspout.api.player.Player; +import org.spout.api.inventory.ItemStack; +import org.spout.api.material.MaterialData; +import org.spout.api.player.Player; public class SpoutPlayerBlockBag extends BlockBag { /** diff --git a/src/main/java/com/sk89q/worldedit/spout/SpoutRawCommandExecutor.java b/src/main/java/com/sk89q/worldedit/spout/SpoutRawCommandExecutor.java index e15c238b6..c572936a8 100644 --- a/src/main/java/com/sk89q/worldedit/spout/SpoutRawCommandExecutor.java +++ b/src/main/java/com/sk89q/worldedit/spout/SpoutRawCommandExecutor.java @@ -18,10 +18,10 @@ package com.sk89q.worldedit.spout; -import org.getspout.api.command.CommandException; -import org.getspout.api.command.CommandSource; -import org.getspout.api.command.RawCommandExecutor; -import org.getspout.api.util.MiscCompatibilityUtils; +import org.spout.api.command.CommandException; +import org.spout.api.command.CommandSource; +import org.spout.api.command.RawCommandExecutor; +import org.spout.api.util.MiscCompatibilityUtils; /** * @author zml2008 diff --git a/src/main/java/com/sk89q/worldedit/spout/SpoutServerInterface.java b/src/main/java/com/sk89q/worldedit/spout/SpoutServerInterface.java index 2bf477f31..2a4383f89 100644 --- a/src/main/java/com/sk89q/worldedit/spout/SpoutServerInterface.java +++ b/src/main/java/com/sk89q/worldedit/spout/SpoutServerInterface.java @@ -22,11 +22,11 @@ package com.sk89q.worldedit.spout; import com.sk89q.minecraft.util.commands.Command; import com.sk89q.worldedit.LocalWorld; import com.sk89q.worldedit.ServerInterface; -import org.getspout.api.Game; -import org.getspout.api.Spout; -import org.getspout.api.geo.World; -import org.getspout.api.material.Material; -import org.getspout.api.material.MaterialData; +import org.spout.api.Game; +import org.spout.api.Spout; +import org.spout.api.geo.World; +import org.spout.api.material.Material; +import org.spout.api.material.MaterialData; import java.util.ArrayList; import java.util.Collection; diff --git a/src/main/java/com/sk89q/worldedit/spout/SpoutUtil.java b/src/main/java/com/sk89q/worldedit/spout/SpoutUtil.java index 2fa85a25e..afd238dd7 100644 --- a/src/main/java/com/sk89q/worldedit/spout/SpoutUtil.java +++ b/src/main/java/com/sk89q/worldedit/spout/SpoutUtil.java @@ -24,13 +24,13 @@ import com.sk89q.worldedit.BlockWorldVector; import com.sk89q.worldedit.LocalWorld; import com.sk89q.worldedit.Vector; import com.sk89q.worldedit.WorldVector; -import org.getspout.api.Game; -import org.getspout.api.geo.World; -import org.getspout.api.geo.cuboid.Block; -import org.getspout.api.geo.discrete.Point; -import org.getspout.api.material.block.BlockFace; -import org.getspout.api.math.Vector3; -import org.getspout.api.player.Player; +import org.spout.api.Game; +import org.spout.api.geo.World; +import org.spout.api.geo.cuboid.Block; +import org.spout.api.geo.discrete.Point; +import org.spout.api.material.block.BlockFace; +import org.spout.api.math.Vector3; +import org.spout.api.player.Player; import java.util.HashMap; import java.util.Map; @@ -70,7 +70,7 @@ public class SpoutUtil { return new Vector(loc.getX(), loc.getY(), loc.getZ()); } - public static Vector toVector(org.getspout.api.math.Vector3 vector) { + public static Vector toVector(org.spout.api.math.Vector3 vector) { return new Vector(vector.getX(), vector.getY(), vector.getZ()); } diff --git a/src/main/java/com/sk89q/worldedit/spout/SpoutWorld.java b/src/main/java/com/sk89q/worldedit/spout/SpoutWorld.java index ac77e8e54..e89f43f68 100644 --- a/src/main/java/com/sk89q/worldedit/spout/SpoutWorld.java +++ b/src/main/java/com/sk89q/worldedit/spout/SpoutWorld.java @@ -28,8 +28,8 @@ import com.sk89q.worldedit.blocks.BaseBlock; import com.sk89q.worldedit.blocks.BaseItemStack; import com.sk89q.worldedit.regions.Region; -import org.getspout.api.geo.World; -import org.getspout.api.material.MaterialData; +import org.spout.api.geo.World; +import org.spout.api.material.MaterialData; public class SpoutWorld extends LocalWorld { private World world; diff --git a/src/main/java/com/sk89q/worldedit/spout/WorldEditPlayerListener.java b/src/main/java/com/sk89q/worldedit/spout/WorldEditPlayerListener.java index 5fa41457e..33e3fae22 100644 --- a/src/main/java/com/sk89q/worldedit/spout/WorldEditPlayerListener.java +++ b/src/main/java/com/sk89q/worldedit/spout/WorldEditPlayerListener.java @@ -24,17 +24,17 @@ import com.sk89q.worldedit.LocalPlayer; import com.sk89q.worldedit.LocalWorld; import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.WorldVector; -import org.getspout.api.Spout; -import org.getspout.api.event.EventHandler; -import org.getspout.api.event.Listener; -import org.getspout.api.event.Order; -import org.getspout.api.event.player.PlayerChatEvent; -import org.getspout.api.event.player.PlayerInteractEvent; -import org.getspout.api.event.player.PlayerInteractEvent.Action; -import org.getspout.api.event.player.PlayerJoinEvent; -import org.getspout.api.event.player.PlayerLeaveEvent; -import org.getspout.api.event.server.PreCommandEvent; -import org.getspout.api.geo.discrete.Point; +import org.spout.api.Spout; +import org.spout.api.event.EventHandler; +import org.spout.api.event.Listener; +import org.spout.api.event.Order; +import org.spout.api.event.player.PlayerChatEvent; +import org.spout.api.event.player.PlayerInteractEvent; +import org.spout.api.event.player.PlayerInteractEvent.Action; +import org.spout.api.event.player.PlayerJoinEvent; +import org.spout.api.event.player.PlayerLeaveEvent; +import org.spout.api.event.server.PreCommandEvent; +import org.spout.api.geo.discrete.Point; import java.util.regex.Matcher; import java.util.regex.Pattern; diff --git a/src/main/java/com/sk89q/worldedit/spout/WorldEditPlugin.java b/src/main/java/com/sk89q/worldedit/spout/WorldEditPlugin.java index 91b297951..32927eece 100644 --- a/src/main/java/com/sk89q/worldedit/spout/WorldEditPlugin.java +++ b/src/main/java/com/sk89q/worldedit/spout/WorldEditPlugin.java @@ -30,11 +30,11 @@ import com.sk89q.worldedit.spout.selections.CuboidSelection; import com.sk89q.worldedit.spout.selections.Polygonal2DSelection; import com.sk89q.worldedit.spout.selections.Selection; import com.sk89q.worldedit.util.YAMLConfiguration; -import org.getspout.api.command.CommandSource; -import org.getspout.api.geo.World; -import org.getspout.api.player.Player; -import org.getspout.api.plugin.CommonPlugin; -import org.getspout.api.util.Named; +import org.spout.api.command.CommandSource; +import org.spout.api.geo.World; +import org.spout.api.player.Player; +import org.spout.api.plugin.CommonPlugin; +import org.spout.api.util.Named; import java.io.*; import java.util.jar.JarFile; diff --git a/src/main/java/com/sk89q/worldedit/spout/selections/CuboidSelection.java b/src/main/java/com/sk89q/worldedit/spout/selections/CuboidSelection.java index a389d524c..6aa9de157 100644 --- a/src/main/java/com/sk89q/worldedit/spout/selections/CuboidSelection.java +++ b/src/main/java/com/sk89q/worldedit/spout/selections/CuboidSelection.java @@ -25,8 +25,8 @@ import com.sk89q.worldedit.spout.SpoutUtil; import com.sk89q.worldedit.regions.CuboidRegion; import com.sk89q.worldedit.regions.CuboidRegionSelector; import com.sk89q.worldedit.regions.RegionSelector; -import org.getspout.api.geo.World; -import org.getspout.api.geo.discrete.Point; +import org.spout.api.geo.World; +import org.spout.api.geo.discrete.Point; public class CuboidSelection extends RegionSelection { diff --git a/src/main/java/com/sk89q/worldedit/spout/selections/Polygonal2DSelection.java b/src/main/java/com/sk89q/worldedit/spout/selections/Polygonal2DSelection.java index f56e4394c..57478251c 100644 --- a/src/main/java/com/sk89q/worldedit/spout/selections/Polygonal2DSelection.java +++ b/src/main/java/com/sk89q/worldedit/spout/selections/Polygonal2DSelection.java @@ -27,7 +27,7 @@ import com.sk89q.worldedit.regions.Polygonal2DRegion; import com.sk89q.worldedit.regions.Polygonal2DRegionSelector; import com.sk89q.worldedit.regions.RegionSelector; import com.sk89q.worldedit.spout.SpoutUtil; -import org.getspout.api.geo.World; +import org.spout.api.geo.World; import java.util.Collections; import java.util.List; diff --git a/src/main/java/com/sk89q/worldedit/spout/selections/RegionSelection.java b/src/main/java/com/sk89q/worldedit/spout/selections/RegionSelection.java index c0b39f313..cf3a5c6ad 100644 --- a/src/main/java/com/sk89q/worldedit/spout/selections/RegionSelection.java +++ b/src/main/java/com/sk89q/worldedit/spout/selections/RegionSelection.java @@ -25,8 +25,8 @@ import com.sk89q.worldedit.Vector; import com.sk89q.worldedit.regions.Region; import com.sk89q.worldedit.regions.RegionSelector; import com.sk89q.worldedit.spout.SpoutUtil; -import org.getspout.api.geo.World; -import org.getspout.api.geo.discrete.Point; +import org.spout.api.geo.World; +import org.spout.api.geo.discrete.Point; public abstract class RegionSelection implements Selection { diff --git a/src/main/java/com/sk89q/worldedit/spout/selections/Selection.java b/src/main/java/com/sk89q/worldedit/spout/selections/Selection.java index 5695f64da..e645ce988 100644 --- a/src/main/java/com/sk89q/worldedit/spout/selections/Selection.java +++ b/src/main/java/com/sk89q/worldedit/spout/selections/Selection.java @@ -23,8 +23,8 @@ package com.sk89q.worldedit.spout.selections; import com.sk89q.worldedit.Vector; import com.sk89q.worldedit.regions.RegionSelector; -import org.getspout.api.geo.World; -import org.getspout.api.geo.discrete.Point; +import org.spout.api.geo.World; +import org.spout.api.geo.discrete.Point; public interface Selection { /**