1
0
mirror of https://e.coding.net/circlecloud/QuickShop.git synced 2024-09-29 17:22:34 +00:00

fix: 调整异常抛出

This commit is contained in:
502647092 2016-05-11 22:46:51 +08:00
parent e0de9dbe30
commit e3223aa25f

View File

@ -272,12 +272,11 @@ public class ContainerShop implements Shop {
* @return The chest this shop is based on. * @return The chest this shop is based on.
*/ */
public Inventory getInventory() throws IllegalStateException { public Inventory getInventory() throws IllegalStateException {
InventoryHolder container;
try { try {
container = (InventoryHolder) this.loc.getBlock().getState(); final InventoryHolder container = (InventoryHolder) this.loc.getBlock().getState();
return container.getInventory(); return container.getInventory();
} catch (final Exception e) { } catch (final Exception e) {
throw new IllegalStateException("Inventory doesn't exist anymore"); throw new IllegalStateException("容器已经不存在了!", e);
} }
} }