From 094909c7e1581dd1b3ca5af9b50c3bdc98e6d841 Mon Sep 17 00:00:00 2001 From: TomyLobo Date: Mon, 13 Aug 2012 19:40:13 +0200 Subject: [PATCH] Fixed for SpoutAPI changes. --- .../com/sk89q/worldedit/spout/SessionTimer.java | 2 +- .../sk89q/worldedit/spout/SpoutCommandSender.java | 2 +- .../com/sk89q/worldedit/spout/SpoutEntity.java | 4 ++-- .../com/sk89q/worldedit/spout/SpoutPlayer.java | 14 +++++++------- .../sk89q/worldedit/spout/SpoutPlayerBlockBag.java | 2 +- .../java/com/sk89q/worldedit/spout/SpoutUtil.java | 2 +- .../java/com/sk89q/worldedit/spout/SpoutWorld.java | 10 +++++----- .../com/sk89q/worldedit/spout/WorldEditPlugin.java | 2 +- 8 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/main/java/com/sk89q/worldedit/spout/SessionTimer.java b/src/main/java/com/sk89q/worldedit/spout/SessionTimer.java index c2b0dfdb3..13a027f44 100644 --- a/src/main/java/com/sk89q/worldedit/spout/SessionTimer.java +++ b/src/main/java/com/sk89q/worldedit/spout/SessionTimer.java @@ -24,7 +24,7 @@ package com.sk89q.worldedit.spout; import com.sk89q.worldedit.SessionCheck; import com.sk89q.worldedit.WorldEdit; import org.spout.api.Engine; -import org.spout.api.player.Player; +import org.spout.api.entity.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 fe6fb8c4b..908939e5e 100644 --- a/src/main/java/com/sk89q/worldedit/spout/SpoutCommandSender.java +++ b/src/main/java/com/sk89q/worldedit/spout/SpoutCommandSender.java @@ -30,7 +30,7 @@ import com.sk89q.worldedit.WorldVector; import com.sk89q.worldedit.bags.BlockBag; import org.spout.api.chat.style.ChatStyle; import org.spout.api.command.CommandSource; -import org.spout.api.player.Player; +import org.spout.api.entity.Player; public class SpoutCommandSender extends LocalPlayer { private CommandSource sender; diff --git a/src/main/java/com/sk89q/worldedit/spout/SpoutEntity.java b/src/main/java/com/sk89q/worldedit/spout/SpoutEntity.java index d15db2e07..510a81d27 100644 --- a/src/main/java/com/sk89q/worldedit/spout/SpoutEntity.java +++ b/src/main/java/com/sk89q/worldedit/spout/SpoutEntity.java @@ -20,9 +20,9 @@ package com.sk89q.worldedit.spout; import com.sk89q.worldedit.LocalEntity; import com.sk89q.worldedit.Location; -import org.spout.api.entity.component.Controller; +import org.spout.api.entity.Controller; import org.spout.api.entity.Entity; -import org.spout.api.entity.component.controller.type.ControllerType; +import org.spout.api.entity.controller.type.ControllerType; import org.spout.api.geo.World; import org.spout.api.geo.discrete.Point; diff --git a/src/main/java/com/sk89q/worldedit/spout/SpoutPlayer.java b/src/main/java/com/sk89q/worldedit/spout/SpoutPlayer.java index e302338a0..ca466d2b7 100644 --- a/src/main/java/com/sk89q/worldedit/spout/SpoutPlayer.java +++ b/src/main/java/com/sk89q/worldedit/spout/SpoutPlayer.java @@ -31,13 +31,13 @@ import com.sk89q.worldedit.cui.CUIEvent; import org.spout.api.Client; import org.spout.api.chat.style.ChatStyle; -import org.spout.api.entity.component.Controller; +import org.spout.api.entity.Controller; import org.spout.api.geo.discrete.Point; import org.spout.api.inventory.ItemStack; -import org.spout.api.player.Player; +import org.spout.api.entity.Player; import org.spout.vanilla.material.VanillaMaterial; import org.spout.vanilla.material.VanillaMaterials; -import org.spout.vanilla.controller.living.player.VanillaPlayer; +import org.spout.vanilla.entity.VanillaPlayerController; public class SpoutPlayer extends LocalPlayer { private Player player; @@ -53,8 +53,8 @@ public class SpoutPlayer extends LocalPlayer { @Override public int getItemInHand() { Controller controller = player.getController(); - if (controller instanceof VanillaPlayer) { - ItemStack itemStack = ((VanillaPlayer) controller).getInventory().getQuickbar().getCurrentItem(); + if (controller instanceof VanillaPlayerController) { + ItemStack itemStack = ((VanillaPlayerController) controller).getInventory().getQuickbar().getCurrentItem(); return itemStack != null ? ((VanillaMaterial) itemStack.getMaterial()).getMinecraftId() : 0; } else { return 0; @@ -86,8 +86,8 @@ public class SpoutPlayer extends LocalPlayer { @Override public void giveItem(int type, int amt) { Controller controller = player.getController(); - if (controller instanceof VanillaPlayer) { - ((VanillaPlayer) controller).getInventory() + if (controller instanceof VanillaPlayerController) { + ((VanillaPlayerController) controller).getInventory() .addItem(new ItemStack(VanillaMaterials.getMaterial((short) type), amt), false); } } diff --git a/src/main/java/com/sk89q/worldedit/spout/SpoutPlayerBlockBag.java b/src/main/java/com/sk89q/worldedit/spout/SpoutPlayerBlockBag.java index 8b3c00523..736c4850f 100644 --- a/src/main/java/com/sk89q/worldedit/spout/SpoutPlayerBlockBag.java +++ b/src/main/java/com/sk89q/worldedit/spout/SpoutPlayerBlockBag.java @@ -32,7 +32,7 @@ import com.sk89q.worldedit.blocks.BlockID; import org.spout.api.inventory.InventoryBase; import org.spout.api.inventory.ItemStack; import org.spout.api.material.Material; -import org.spout.api.player.Player; +import org.spout.api.entity.Player; import org.spout.vanilla.material.VanillaMaterials; import org.spout.vanilla.util.VanillaPlayerUtil; diff --git a/src/main/java/com/sk89q/worldedit/spout/SpoutUtil.java b/src/main/java/com/sk89q/worldedit/spout/SpoutUtil.java index 02175b013..66881319c 100644 --- a/src/main/java/com/sk89q/worldedit/spout/SpoutUtil.java +++ b/src/main/java/com/sk89q/worldedit/spout/SpoutUtil.java @@ -35,7 +35,7 @@ import org.spout.api.geo.discrete.Point; import org.spout.api.material.block.BlockFace; import org.spout.api.math.MathHelper; import org.spout.api.math.Vector3; -import org.spout.api.player.Player; +import org.spout.api.entity.Player; import java.util.HashMap; import java.util.Map; diff --git a/src/main/java/com/sk89q/worldedit/spout/SpoutWorld.java b/src/main/java/com/sk89q/worldedit/spout/SpoutWorld.java index c8f1bc33d..05eb276af 100644 --- a/src/main/java/com/sk89q/worldedit/spout/SpoutWorld.java +++ b/src/main/java/com/sk89q/worldedit/spout/SpoutWorld.java @@ -44,11 +44,11 @@ import org.spout.api.inventory.ItemStack; import org.spout.api.material.BlockMaterial; import org.spout.api.material.Material; import org.spout.api.math.Vector3; -import org.spout.vanilla.controller.object.moving.Item; -import org.spout.vanilla.controller.object.moving.PrimedTnt; -import org.spout.vanilla.controller.object.projectile.Arrow; -import org.spout.vanilla.controller.object.vehicle.Boat; -import org.spout.vanilla.controller.object.vehicle.Minecart; +import org.spout.vanilla.entity.object.moving.Item; +import org.spout.vanilla.entity.object.moving.PrimedTnt; +import org.spout.vanilla.entity.object.projectile.Arrow; +import org.spout.vanilla.entity.object.vehicle.Boat; +import org.spout.vanilla.entity.object.vehicle.Minecart; import org.spout.vanilla.material.VanillaMaterial; import org.spout.vanilla.material.VanillaMaterials; import org.spout.vanilla.world.generator.normal.object.tree.TreeObject; diff --git a/src/main/java/com/sk89q/worldedit/spout/WorldEditPlugin.java b/src/main/java/com/sk89q/worldedit/spout/WorldEditPlugin.java index cdaacb161..af111e778 100644 --- a/src/main/java/com/sk89q/worldedit/spout/WorldEditPlugin.java +++ b/src/main/java/com/sk89q/worldedit/spout/WorldEditPlugin.java @@ -34,7 +34,7 @@ import com.sk89q.worldedit.spout.selections.Selection; import com.sk89q.worldedit.util.YAMLConfiguration; import org.spout.api.command.CommandSource; import org.spout.api.geo.World; -import org.spout.api.player.Player; +import org.spout.api.entity.Player; import org.spout.api.plugin.CommonPlugin; import org.spout.api.protocol.Protocol; import org.spout.api.scheduler.TaskPriority;