Permalink
Browse files

Merge pull request #358 from Minecrell/feature/sponge-1.9.4

Update for SpongeAPI bleeding changes
  • Loading branch information...
DarkArc committed Jun 4, 2016
2 parents b8f3564 + 5705604 commit acd312c995bb7c388d8ccc071e7bf669f675bc88
Showing with 2 additions and 1 deletion.
  1. +2 −1 worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/SpongePlayer.java
@@ -31,6 +31,7 @@
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 UUID getUniqueId() {
@Override
public int getItemInHand() {
Optional<ItemStack> is = this.player.getItemInHand();
Optional<ItemStack> is = this.player.getItemInHand(HandTypes.MAIN_HAND);
return is.isPresent() ? IDHelper.resolve(is.get().getItem()) : 0;
}

0 comments on commit acd312c

Please sign in to comment.