From b2d2fc2e70813a48a5722407d4836d9f37eeffe2 Mon Sep 17 00:00:00 2001 From: Minecrell Date: Sat, 4 Jun 2016 14:13:18 +0200 Subject: [PATCH] Update for SpongeAPI bleeding changes --- .../src/main/java/com/sk89q/worldedit/sponge/SpongePlayer.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/SpongePlayer.java b/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/SpongePlayer.java index d88f6ecc2..798bec47d 100644 --- a/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/SpongePlayer.java +++ b/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/SpongePlayer.java @@ -31,6 +31,7 @@ import com.sk89q.worldedit.internal.cui.CUIEvent; import com.sk89q.worldedit.session.SessionKey; import com.sk89q.worldedit.sponge.nms.IDHelper; import com.sk89q.worldedit.util.Location; +import org.spongepowered.api.data.type.HandTypes; import org.spongepowered.api.entity.living.player.Player; import org.spongepowered.api.item.inventory.ItemStack; import org.spongepowered.api.text.Text; @@ -60,7 +61,7 @@ public class SpongePlayer extends AbstractPlayerActor { @Override public int getItemInHand() { - Optional is = this.player.getItemInHand(); + Optional is = this.player.getItemInHand(HandTypes.MAIN_HAND); return is.isPresent() ? IDHelper.resolve(is.get().getItem()) : 0; }