From 9c3634d93d015adda08b3719a0ebcf05e25b8655 Mon Sep 17 00:00:00 2001 From: zml2008 Date: Sun, 8 Jan 2012 11:48:53 -0800 Subject: [PATCH] Updated for SpoutAPI Material changes --- src/main/java/com/sk89q/worldedit/spout/SpoutPlayer.java | 2 +- .../java/com/sk89q/worldedit/spout/SpoutPlayerBlockBag.java | 4 ++-- .../java/com/sk89q/worldedit/spout/SpoutServerInterface.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/sk89q/worldedit/spout/SpoutPlayer.java b/src/main/java/com/sk89q/worldedit/spout/SpoutPlayer.java index f2d030aed..c83a5be09 100644 --- a/src/main/java/com/sk89q/worldedit/spout/SpoutPlayer.java +++ b/src/main/java/com/sk89q/worldedit/spout/SpoutPlayer.java @@ -49,7 +49,7 @@ public class SpoutPlayer extends LocalPlayer { @Override public int getItemInHand() { ItemStack itemStack = null;//player.getItemInHand(); - return itemStack != null ? itemStack.getMaterial().getRawId() : 0; + return itemStack != null ? itemStack.getMaterial().getId() : 0; } @Override diff --git a/src/main/java/com/sk89q/worldedit/spout/SpoutPlayerBlockBag.java b/src/main/java/com/sk89q/worldedit/spout/SpoutPlayerBlockBag.java index 8c9d5d97c..746a1441a 100644 --- a/src/main/java/com/sk89q/worldedit/spout/SpoutPlayerBlockBag.java +++ b/src/main/java/com/sk89q/worldedit/spout/SpoutPlayerBlockBag.java @@ -98,7 +98,7 @@ public class SpoutPlayerBlockBag extends BlockBag { continue; } - if (bukkitItem.getMaterial().getRawId() != id) { + if (bukkitItem.getMaterial().getId() != id) { // Type id doesn't fit continue; } @@ -164,7 +164,7 @@ public class SpoutPlayerBlockBag extends BlockBag { continue; } - if (bukkitItem.getMaterial().getRawId() != id) { + if (bukkitItem.getMaterial().getId() != id) { // Type id doesn't fit continue; } diff --git a/src/main/java/com/sk89q/worldedit/spout/SpoutServerInterface.java b/src/main/java/com/sk89q/worldedit/spout/SpoutServerInterface.java index d41060442..2bf477f31 100644 --- a/src/main/java/com/sk89q/worldedit/spout/SpoutServerInterface.java +++ b/src/main/java/com/sk89q/worldedit/spout/SpoutServerInterface.java @@ -46,7 +46,7 @@ public class SpoutServerInterface extends ServerInterface { @Override public int resolveItem(String name) { Material mat = MaterialData.getMaterial(name); - return mat == null ? 0 : mat.getRawId(); + return mat == null ? 0 : mat.getId(); } @Override