3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-12-24 18:10:08 +01:00

Update for SpongeAPI bleeding changes

Dieser Commit ist enthalten in:
Minecrell 2016-06-04 14:13:18 +02:00 committet von wizjany
Ursprung 3216695d65
Commit b2d2fc2e70

Datei anzeigen

@ -31,6 +31,7 @@ import com.sk89q.worldedit.internal.cui.CUIEvent;
import com.sk89q.worldedit.session.SessionKey; import com.sk89q.worldedit.session.SessionKey;
import com.sk89q.worldedit.sponge.nms.IDHelper; import com.sk89q.worldedit.sponge.nms.IDHelper;
import com.sk89q.worldedit.util.Location; 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.entity.living.player.Player;
import org.spongepowered.api.item.inventory.ItemStack; import org.spongepowered.api.item.inventory.ItemStack;
import org.spongepowered.api.text.Text; import org.spongepowered.api.text.Text;
@ -60,7 +61,7 @@ public class SpongePlayer extends AbstractPlayerActor {
@Override @Override
public int getItemInHand() { 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; return is.isPresent() ? IDHelper.resolve(is.get().getItem()) : 0;
} }