mirror of
https://github.com/UraniumMC/KCauldron-Bukkit.git
synced 2026-11-28 07:35:48 +00:00
Upload Bukkit API.
This commit is contained in:
1 parent
a97367b322
commit
220f57b421
739 files changed
+67046
No files matched your search
@@ -0,0 +1,50 @@
|
||||
package org.bukkit.block;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.inventory.DoubleChestInventory;
|
||||
import org.bukkit.inventory.Inventory;
|
||||
import org.bukkit.inventory.InventoryHolder;
|
||||
|
||||
/**
|
||||
* Represents a double chest.
|
||||
*/
|
||||
public class DoubleChest implements InventoryHolder {
|
||||
private DoubleChestInventory inventory;
|
||||
|
||||
public DoubleChest(DoubleChestInventory chest) {
|
||||
inventory = chest;
|
||||
}
|
||||
|
||||
public Inventory getInventory() {
|
||||
return inventory;
|
||||
}
|
||||
|
||||
public InventoryHolder getLeftSide() {
|
||||
return inventory.getLeftSide().getHolder();
|
||||
}
|
||||
|
||||
public InventoryHolder getRightSide() {
|
||||
return inventory.getRightSide().getHolder();
|
||||
}
|
||||
|
||||
public Location getLocation() {
|
||||
return new Location(getWorld(), getX(), getY(), getZ());
|
||||
}
|
||||
|
||||
public World getWorld() {
|
||||
return ((Chest)getLeftSide()).getWorld();
|
||||
}
|
||||
|
||||
public double getX() {
|
||||
return 0.5 * (((Chest)getLeftSide()).getX() + ((Chest)getRightSide()).getX());
|
||||
}
|
||||
|
||||
public double getY() {
|
||||
return 0.5 * (((Chest)getLeftSide()).getY() + ((Chest)getRightSide()).getY());
|
||||
}
|
||||
|
||||
public double getZ() {
|
||||
return 0.5 * (((Chest)getLeftSide()).getZ() + ((Chest)getRightSide()).getZ());
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user