Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-06 03:20:06 +01:00
Fixed for SpoutAPI changes.
Dieser Commit ist enthalten in:
Ursprung
0e897778b0
Commit
094909c7e1
@ -24,7 +24,7 @@ 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.spout.api.Engine;
|
import org.spout.api.Engine;
|
||||||
import org.spout.api.player.Player;
|
import org.spout.api.entity.Player;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used to remove expired sessions in Bukkit.
|
* Used to remove expired sessions in Bukkit.
|
||||||
|
@ -30,7 +30,7 @@ import com.sk89q.worldedit.WorldVector;
|
|||||||
import com.sk89q.worldedit.bags.BlockBag;
|
import com.sk89q.worldedit.bags.BlockBag;
|
||||||
import org.spout.api.chat.style.ChatStyle;
|
import org.spout.api.chat.style.ChatStyle;
|
||||||
import org.spout.api.command.CommandSource;
|
import org.spout.api.command.CommandSource;
|
||||||
import org.spout.api.player.Player;
|
import org.spout.api.entity.Player;
|
||||||
|
|
||||||
public class SpoutCommandSender extends LocalPlayer {
|
public class SpoutCommandSender extends LocalPlayer {
|
||||||
private CommandSource sender;
|
private CommandSource sender;
|
||||||
|
@ -20,9 +20,9 @@ package com.sk89q.worldedit.spout;
|
|||||||
|
|
||||||
import com.sk89q.worldedit.LocalEntity;
|
import com.sk89q.worldedit.LocalEntity;
|
||||||
import com.sk89q.worldedit.Location;
|
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.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.World;
|
||||||
import org.spout.api.geo.discrete.Point;
|
import org.spout.api.geo.discrete.Point;
|
||||||
|
|
||||||
|
@ -31,13 +31,13 @@ import com.sk89q.worldedit.cui.CUIEvent;
|
|||||||
|
|
||||||
import org.spout.api.Client;
|
import org.spout.api.Client;
|
||||||
import org.spout.api.chat.style.ChatStyle;
|
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.geo.discrete.Point;
|
||||||
import org.spout.api.inventory.ItemStack;
|
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.VanillaMaterial;
|
||||||
import org.spout.vanilla.material.VanillaMaterials;
|
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 {
|
public class SpoutPlayer extends LocalPlayer {
|
||||||
private Player player;
|
private Player player;
|
||||||
@ -53,8 +53,8 @@ public class SpoutPlayer extends LocalPlayer {
|
|||||||
@Override
|
@Override
|
||||||
public int getItemInHand() {
|
public int getItemInHand() {
|
||||||
Controller controller = player.getController();
|
Controller controller = player.getController();
|
||||||
if (controller instanceof VanillaPlayer) {
|
if (controller instanceof VanillaPlayerController) {
|
||||||
ItemStack itemStack = ((VanillaPlayer) controller).getInventory().getQuickbar().getCurrentItem();
|
ItemStack itemStack = ((VanillaPlayerController) controller).getInventory().getQuickbar().getCurrentItem();
|
||||||
return itemStack != null ? ((VanillaMaterial) itemStack.getMaterial()).getMinecraftId() : 0;
|
return itemStack != null ? ((VanillaMaterial) itemStack.getMaterial()).getMinecraftId() : 0;
|
||||||
} else {
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
@ -86,8 +86,8 @@ public class SpoutPlayer extends LocalPlayer {
|
|||||||
@Override
|
@Override
|
||||||
public void giveItem(int type, int amt) {
|
public void giveItem(int type, int amt) {
|
||||||
Controller controller = player.getController();
|
Controller controller = player.getController();
|
||||||
if (controller instanceof VanillaPlayer) {
|
if (controller instanceof VanillaPlayerController) {
|
||||||
((VanillaPlayer) controller).getInventory()
|
((VanillaPlayerController) controller).getInventory()
|
||||||
.addItem(new ItemStack(VanillaMaterials.getMaterial((short) type), amt), false);
|
.addItem(new ItemStack(VanillaMaterials.getMaterial((short) type), amt), false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@ import com.sk89q.worldedit.blocks.BlockID;
|
|||||||
import org.spout.api.inventory.InventoryBase;
|
import org.spout.api.inventory.InventoryBase;
|
||||||
import org.spout.api.inventory.ItemStack;
|
import org.spout.api.inventory.ItemStack;
|
||||||
import org.spout.api.material.Material;
|
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.material.VanillaMaterials;
|
||||||
import org.spout.vanilla.util.VanillaPlayerUtil;
|
import org.spout.vanilla.util.VanillaPlayerUtil;
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ import org.spout.api.geo.discrete.Point;
|
|||||||
import org.spout.api.material.block.BlockFace;
|
import org.spout.api.material.block.BlockFace;
|
||||||
import org.spout.api.math.MathHelper;
|
import org.spout.api.math.MathHelper;
|
||||||
import org.spout.api.math.Vector3;
|
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.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -44,11 +44,11 @@ import org.spout.api.inventory.ItemStack;
|
|||||||
import org.spout.api.material.BlockMaterial;
|
import org.spout.api.material.BlockMaterial;
|
||||||
import org.spout.api.material.Material;
|
import org.spout.api.material.Material;
|
||||||
import org.spout.api.math.Vector3;
|
import org.spout.api.math.Vector3;
|
||||||
import org.spout.vanilla.controller.object.moving.Item;
|
import org.spout.vanilla.entity.object.moving.Item;
|
||||||
import org.spout.vanilla.controller.object.moving.PrimedTnt;
|
import org.spout.vanilla.entity.object.moving.PrimedTnt;
|
||||||
import org.spout.vanilla.controller.object.projectile.Arrow;
|
import org.spout.vanilla.entity.object.projectile.Arrow;
|
||||||
import org.spout.vanilla.controller.object.vehicle.Boat;
|
import org.spout.vanilla.entity.object.vehicle.Boat;
|
||||||
import org.spout.vanilla.controller.object.vehicle.Minecart;
|
import org.spout.vanilla.entity.object.vehicle.Minecart;
|
||||||
import org.spout.vanilla.material.VanillaMaterial;
|
import org.spout.vanilla.material.VanillaMaterial;
|
||||||
import org.spout.vanilla.material.VanillaMaterials;
|
import org.spout.vanilla.material.VanillaMaterials;
|
||||||
import org.spout.vanilla.world.generator.normal.object.tree.TreeObject;
|
import org.spout.vanilla.world.generator.normal.object.tree.TreeObject;
|
||||||
|
@ -34,7 +34,7 @@ import com.sk89q.worldedit.spout.selections.Selection;
|
|||||||
import com.sk89q.worldedit.util.YAMLConfiguration;
|
import com.sk89q.worldedit.util.YAMLConfiguration;
|
||||||
import org.spout.api.command.CommandSource;
|
import org.spout.api.command.CommandSource;
|
||||||
import org.spout.api.geo.World;
|
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.plugin.CommonPlugin;
|
||||||
import org.spout.api.protocol.Protocol;
|
import org.spout.api.protocol.Protocol;
|
||||||
import org.spout.api.scheduler.TaskPriority;
|
import org.spout.api.scheduler.TaskPriority;
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren