mirror of
https://e.coding.net/circlecloud/QuickShop.git
synced 2024-11-22 01:58:54 +00:00
fix: 调整异常抛出
This commit is contained in:
parent
e0de9dbe30
commit
e3223aa25f
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user