Fixed for SpoutAPI changes.

This commit is contained in:
TomyLobo 2012-08-13 19:40:13 +02:00
parent 0e897778b0
commit 094909c7e1
8 changed files with 19 additions and 19 deletions

View File

@ -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.

View File

@ -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;

View File

@ -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;

View File

@ -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);
}
}

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;