Updated for package changes in SpoutAPI

This commit is contained in:
zml2008 2012-01-08 17:05:35 -08:00
parent 9c3634d93d
commit c0d13e9b7d
15 changed files with 59 additions and 60 deletions

View File

@ -86,7 +86,7 @@
<!-- Spout --> <!-- Spout -->
<dependency> <dependency>
<groupId>org.getspout</groupId> <groupId>org.spout</groupId>
<artifactId>spoutapi</artifactId> <artifactId>spoutapi</artifactId>
<version>dev-SNAPSHOT</version> <version>dev-SNAPSHOT</version>
</dependency> </dependency>

View File

@ -21,8 +21,8 @@ package com.sk89q.worldedit.spout;
import com.sk89q.worldedit.SessionCheck; import com.sk89q.worldedit.SessionCheck;
import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.WorldEdit;
import org.getspout.api.Game; import org.spout.api.Game;
import org.getspout.api.player.Player; import org.spout.api.player.Player;
/** /**
* Used to remove expired sessions in Bukkit. * Used to remove expired sessions in Bukkit.

View File

@ -7,9 +7,9 @@ import com.sk89q.worldedit.ServerInterface;
import com.sk89q.worldedit.Vector; import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.WorldVector; import com.sk89q.worldedit.WorldVector;
import com.sk89q.worldedit.bags.BlockBag; import com.sk89q.worldedit.bags.BlockBag;
import org.getspout.api.ChatColor; import org.spout.api.ChatColor;
import org.getspout.api.command.CommandSource; import org.spout.api.command.CommandSource;
import org.getspout.api.player.Player; import org.spout.api.player.Player;
public class SpoutCommandSender extends LocalPlayer { public class SpoutCommandSender extends LocalPlayer {
private CommandSource sender; private CommandSource sender;

View File

@ -27,13 +27,12 @@ import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.WorldVector; import com.sk89q.worldedit.WorldVector;
import com.sk89q.worldedit.bags.BlockBag; import com.sk89q.worldedit.bags.BlockBag;
import com.sk89q.worldedit.cui.CUIEvent; import com.sk89q.worldedit.cui.CUIEvent;
import org.getspout.api.geo.discrete.Point; import org.spout.api.geo.discrete.Point;
import org.getspout.api.geo.discrete.Transform; import org.spout.api.geo.discrete.Transform;
import org.getspout.api.inventory.ItemStack; import org.spout.api.inventory.ItemStack;
import org.getspout.api.math.MathHelper; import org.spout.api.math.Quaternion;
import org.getspout.api.math.Quaternion; import org.spout.api.math.Vector3;
import org.getspout.api.math.Vector3; import org.spout.api.player.Player;
import org.getspout.api.player.Player;
public class SpoutPlayer extends LocalPlayer { public class SpoutPlayer extends LocalPlayer {
private Player player; private Player player;
@ -66,12 +65,12 @@ public class SpoutPlayer extends LocalPlayer {
@Override @Override
public double getPitch() { public double getPitch() {
return MathHelper.getDirectionVector(player.getEntity().getTransform().getRotation()).getY(); return player.getEntity().getTransform().getRotation().getAxisAngles().getY();
} }
@Override @Override
public double getYaw() { public double getYaw() {
return MathHelper.getDirectionVector(player.getEntity().getTransform().getRotation()).getZ(); return player.getEntity().getTransform().getRotation().getAxisAngles().getZ();
} }
@Override @Override

View File

@ -28,9 +28,9 @@ import com.sk89q.worldedit.blocks.BaseItem;
import com.sk89q.worldedit.blocks.BaseItemStack; import com.sk89q.worldedit.blocks.BaseItemStack;
import com.sk89q.worldedit.blocks.BlockID; import com.sk89q.worldedit.blocks.BlockID;
import com.sk89q.worldedit.blocks.ItemType; import com.sk89q.worldedit.blocks.ItemType;
import org.getspout.api.inventory.ItemStack; import org.spout.api.inventory.ItemStack;
import org.getspout.api.material.MaterialData; import org.spout.api.material.MaterialData;
import org.getspout.api.player.Player; import org.spout.api.player.Player;
public class SpoutPlayerBlockBag extends BlockBag { public class SpoutPlayerBlockBag extends BlockBag {
/** /**

View File

@ -18,10 +18,10 @@
package com.sk89q.worldedit.spout; package com.sk89q.worldedit.spout;
import org.getspout.api.command.CommandException; import org.spout.api.command.CommandException;
import org.getspout.api.command.CommandSource; import org.spout.api.command.CommandSource;
import org.getspout.api.command.RawCommandExecutor; import org.spout.api.command.RawCommandExecutor;
import org.getspout.api.util.MiscCompatibilityUtils; import org.spout.api.util.MiscCompatibilityUtils;
/** /**
* @author zml2008 * @author zml2008

View File

@ -22,11 +22,11 @@ package com.sk89q.worldedit.spout;
import com.sk89q.minecraft.util.commands.Command; import com.sk89q.minecraft.util.commands.Command;
import com.sk89q.worldedit.LocalWorld; import com.sk89q.worldedit.LocalWorld;
import com.sk89q.worldedit.ServerInterface; import com.sk89q.worldedit.ServerInterface;
import org.getspout.api.Game; import org.spout.api.Game;
import org.getspout.api.Spout; import org.spout.api.Spout;
import org.getspout.api.geo.World; import org.spout.api.geo.World;
import org.getspout.api.material.Material; import org.spout.api.material.Material;
import org.getspout.api.material.MaterialData; import org.spout.api.material.MaterialData;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;

View File

@ -24,13 +24,13 @@ import com.sk89q.worldedit.BlockWorldVector;
import com.sk89q.worldedit.LocalWorld; import com.sk89q.worldedit.LocalWorld;
import com.sk89q.worldedit.Vector; import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.WorldVector; import com.sk89q.worldedit.WorldVector;
import org.getspout.api.Game; import org.spout.api.Game;
import org.getspout.api.geo.World; import org.spout.api.geo.World;
import org.getspout.api.geo.cuboid.Block; import org.spout.api.geo.cuboid.Block;
import org.getspout.api.geo.discrete.Point; import org.spout.api.geo.discrete.Point;
import org.getspout.api.material.block.BlockFace; import org.spout.api.material.block.BlockFace;
import org.getspout.api.math.Vector3; import org.spout.api.math.Vector3;
import org.getspout.api.player.Player; import org.spout.api.player.Player;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
@ -70,7 +70,7 @@ public class SpoutUtil {
return new Vector(loc.getX(), loc.getY(), loc.getZ()); 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()); return new Vector(vector.getX(), vector.getY(), vector.getZ());
} }

View File

@ -28,8 +28,8 @@ import com.sk89q.worldedit.blocks.BaseBlock;
import com.sk89q.worldedit.blocks.BaseItemStack; import com.sk89q.worldedit.blocks.BaseItemStack;
import com.sk89q.worldedit.regions.Region; import com.sk89q.worldedit.regions.Region;
import org.getspout.api.geo.World; import org.spout.api.geo.World;
import org.getspout.api.material.MaterialData; import org.spout.api.material.MaterialData;
public class SpoutWorld extends LocalWorld { public class SpoutWorld extends LocalWorld {
private World world; private World world;

View File

@ -24,17 +24,17 @@ import com.sk89q.worldedit.LocalPlayer;
import com.sk89q.worldedit.LocalWorld; import com.sk89q.worldedit.LocalWorld;
import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.WorldEdit;
import com.sk89q.worldedit.WorldVector; import com.sk89q.worldedit.WorldVector;
import org.getspout.api.Spout; import org.spout.api.Spout;
import org.getspout.api.event.EventHandler; import org.spout.api.event.EventHandler;
import org.getspout.api.event.Listener; import org.spout.api.event.Listener;
import org.getspout.api.event.Order; import org.spout.api.event.Order;
import org.getspout.api.event.player.PlayerChatEvent; import org.spout.api.event.player.PlayerChatEvent;
import org.getspout.api.event.player.PlayerInteractEvent; import org.spout.api.event.player.PlayerInteractEvent;
import org.getspout.api.event.player.PlayerInteractEvent.Action; import org.spout.api.event.player.PlayerInteractEvent.Action;
import org.getspout.api.event.player.PlayerJoinEvent; import org.spout.api.event.player.PlayerJoinEvent;
import org.getspout.api.event.player.PlayerLeaveEvent; import org.spout.api.event.player.PlayerLeaveEvent;
import org.getspout.api.event.server.PreCommandEvent; import org.spout.api.event.server.PreCommandEvent;
import org.getspout.api.geo.discrete.Point; import org.spout.api.geo.discrete.Point;
import java.util.regex.Matcher; import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;

View File

@ -30,11 +30,11 @@ import com.sk89q.worldedit.spout.selections.CuboidSelection;
import com.sk89q.worldedit.spout.selections.Polygonal2DSelection; import com.sk89q.worldedit.spout.selections.Polygonal2DSelection;
import com.sk89q.worldedit.spout.selections.Selection; import com.sk89q.worldedit.spout.selections.Selection;
import com.sk89q.worldedit.util.YAMLConfiguration; import com.sk89q.worldedit.util.YAMLConfiguration;
import org.getspout.api.command.CommandSource; import org.spout.api.command.CommandSource;
import org.getspout.api.geo.World; import org.spout.api.geo.World;
import org.getspout.api.player.Player; import org.spout.api.player.Player;
import org.getspout.api.plugin.CommonPlugin; import org.spout.api.plugin.CommonPlugin;
import org.getspout.api.util.Named; import org.spout.api.util.Named;
import java.io.*; import java.io.*;
import java.util.jar.JarFile; import java.util.jar.JarFile;

View File

@ -25,8 +25,8 @@ import com.sk89q.worldedit.spout.SpoutUtil;
import com.sk89q.worldedit.regions.CuboidRegion; import com.sk89q.worldedit.regions.CuboidRegion;
import com.sk89q.worldedit.regions.CuboidRegionSelector; import com.sk89q.worldedit.regions.CuboidRegionSelector;
import com.sk89q.worldedit.regions.RegionSelector; import com.sk89q.worldedit.regions.RegionSelector;
import org.getspout.api.geo.World; import org.spout.api.geo.World;
import org.getspout.api.geo.discrete.Point; import org.spout.api.geo.discrete.Point;
public class CuboidSelection extends RegionSelection { public class CuboidSelection extends RegionSelection {

View File

@ -27,7 +27,7 @@ import com.sk89q.worldedit.regions.Polygonal2DRegion;
import com.sk89q.worldedit.regions.Polygonal2DRegionSelector; import com.sk89q.worldedit.regions.Polygonal2DRegionSelector;
import com.sk89q.worldedit.regions.RegionSelector; import com.sk89q.worldedit.regions.RegionSelector;
import com.sk89q.worldedit.spout.SpoutUtil; 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.Collections;
import java.util.List; import java.util.List;

View File

@ -25,8 +25,8 @@ import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.regions.Region; import com.sk89q.worldedit.regions.Region;
import com.sk89q.worldedit.regions.RegionSelector; import com.sk89q.worldedit.regions.RegionSelector;
import com.sk89q.worldedit.spout.SpoutUtil; import com.sk89q.worldedit.spout.SpoutUtil;
import org.getspout.api.geo.World; import org.spout.api.geo.World;
import org.getspout.api.geo.discrete.Point; import org.spout.api.geo.discrete.Point;
public abstract class RegionSelection implements Selection { public abstract class RegionSelection implements Selection {

View File

@ -23,8 +23,8 @@ package com.sk89q.worldedit.spout.selections;
import com.sk89q.worldedit.Vector; import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.regions.RegionSelector; import com.sk89q.worldedit.regions.RegionSelector;
import org.getspout.api.geo.World; import org.spout.api.geo.World;
import org.getspout.api.geo.discrete.Point; import org.spout.api.geo.discrete.Point;
public interface Selection { public interface Selection {
/** /**