fix: 调整异常抛出

pull/3/HEAD
502647092 2016-05-11 22:46:51 +08:00
parent e0de9dbe30
commit e3223aa25f
1 changed files with 2 additions and 3 deletions

View File

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