SPIGOT-1039: Improve DoubleChest semantics
This commit is contained in:
parent
f068c5e843
commit
4c1e9342cb
@ -8,6 +8,7 @@ import org.bukkit.inventory.Inventory;
|
|||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
import net.minecraft.server.InventoryLargeChest;
|
import net.minecraft.server.InventoryLargeChest;
|
||||||
|
import org.bukkit.Location;
|
||||||
|
|
||||||
public class CraftInventoryDoubleChest extends CraftInventory implements DoubleChestInventory {
|
public class CraftInventoryDoubleChest extends CraftInventory implements DoubleChestInventory {
|
||||||
private final CraftInventory left;
|
private final CraftInventory left;
|
||||||
@ -59,4 +60,9 @@ public class CraftInventoryDoubleChest extends CraftInventory implements DoubleC
|
|||||||
public DoubleChest getHolder() {
|
public DoubleChest getHolder() {
|
||||||
return new DoubleChest(this);
|
return new DoubleChest(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Location getLocation() {
|
||||||
|
return getLeftSide().getLocation().add(getRightSide().getLocation()).multiply(0.5);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user