From 7b759e92a155663cb198a821480d66ec80a5d743 Mon Sep 17 00:00:00 2001 From: Acrobot Date: Mon, 31 Dec 2012 02:34:39 +0100 Subject: [PATCH] Change to utility methods --- com/Acrobot/Breeze/Utils/BlockUtil.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/com/Acrobot/Breeze/Utils/BlockUtil.java b/com/Acrobot/Breeze/Utils/BlockUtil.java index 07f3008..0ac2011 100644 --- a/com/Acrobot/Breeze/Utils/BlockUtil.java +++ b/com/Acrobot/Breeze/Utils/BlockUtil.java @@ -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;