mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-11 20:13:55 +00:00
Fixed a bunch of extends and removed slottableblockbag
This commit is contained in:
@ -19,19 +19,17 @@
|
||||
|
||||
package com.sk89q.worldedit.bukkit;
|
||||
|
||||
import com.sk89q.worldedit.blocks.BaseItem;
|
||||
import com.sk89q.worldedit.blocks.BaseItemStack;
|
||||
import com.sk89q.worldedit.extent.inventory.BlockBag;
|
||||
import com.sk89q.worldedit.extent.inventory.BlockBagException;
|
||||
import com.sk89q.worldedit.extent.inventory.OutOfBlocksException;
|
||||
import com.sk89q.worldedit.extent.inventory.OutOfSpaceException;
|
||||
import com.sk89q.worldedit.extent.inventory.SlottableBlockBag;
|
||||
import com.sk89q.worldedit.util.Location;
|
||||
import com.sk89q.worldedit.world.block.BlockState;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
public class BukkitPlayerBlockBag extends BlockBag implements SlottableBlockBag {
|
||||
public class BukkitPlayerBlockBag extends BlockBag {
|
||||
|
||||
private Player player;
|
||||
private ItemStack[] items;
|
||||
@ -63,19 +61,6 @@ public class BukkitPlayerBlockBag extends BlockBag implements SlottableBlockBag
|
||||
return player;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseItem getItem(int slot) {
|
||||
loadInventory();
|
||||
return BukkitAdapter.adapt(items[slot]);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setItem(int slot, BaseItem block) {
|
||||
loadInventory();
|
||||
BaseItemStack stack = block instanceof BaseItemStack ? (BaseItemStack) block : new BaseItemStack(block.getType(), block.getNbtData(), 1);
|
||||
items[slot] = BukkitAdapter.adapt(stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fetchBlock(BlockState blockState) throws BlockBagException {
|
||||
if (blockState.getBlockType().getMaterial().isAir()) {
|
||||
|
Reference in New Issue
Block a user