Change to utility methods

This commit is contained in:
Acrobot 2012-12-31 02:34:39 +01:00
parent 39d3853802
commit 7b759e92a1

View File

@ -43,18 +43,14 @@ public class BlockUtil {
}
/**
* Opens the block's inventory's GUI
* Opens the holder's inventory GUI
*
* @param block Block
* @param holder Inventory holder
* @param player Player on whose screen the GUI is going to be shown
* @return Was the opening successful?
*/
public static boolean openBlockGUI(Block block, Player player) {
if (!(block instanceof InventoryHolder)) {
return false;
}
Inventory inventory = ((InventoryHolder) block).getInventory();
public static boolean openBlockGUI(InventoryHolder holder, Player player) {
Inventory inventory = holder.getInventory();
player.openInventory(inventory);
return true;