mirror of
https://e.coding.net/circlecloud/QuickShop.git
synced 2025-10-02 12:37:27 +00:00
fix: 调整异常抛出
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user