Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-12-25 02:20:07 +01:00
Update for SpongeAPI bleeding changes
Dieser Commit ist enthalten in:
Ursprung
3216695d65
Commit
b2d2fc2e70
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren