Further BaseBlock modernisation

This commit is contained in:
Matthew Miller
2018-06-18 17:53:33 +10:00
parent 811f1d4433
commit e99190225e
61 changed files with 344 additions and 787 deletions

View File

@ -19,7 +19,6 @@
package com.sk89q.worldedit.extension.platform;
import com.sk89q.worldedit.NotABlockException;
import com.sk89q.worldedit.PlayerDirection;
import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.WorldEditException;
@ -366,9 +365,6 @@ public abstract class AbstractPlayerActor implements Actor, Player, Cloneable {
@Override
public BaseBlock getBlockInHand(HandSide handSide) throws WorldEditException {
final ItemType typeId = getItemInHand(handSide).getType();
if (!getWorld().isValidBlockType(typeId.getLegacyId())) {
throw new NotABlockException(typeId.getId());
}
return new BaseBlock(typeId.getLegacyId());
}

View File

@ -65,8 +65,8 @@ class PlayerProxy extends AbstractPlayerActor {
}
@Override
public void giveItem(int type, int amount) {
basePlayer.giveItem(type, amount);
public void giveItem(BaseItemStack itemStack) {
basePlayer.giveItem(itemStack);
}
@Override