Cleanup: Better specify exception catch and remove unused import

This commit is contained in:
Phoenix616 2023-03-01 18:16:14 +01:00
parent 93f14a330d
commit 7a09c53bde
No known key found for this signature in database
GPG Key ID: 40E2321E71738EB0
1 changed files with 1 additions and 2 deletions

View File

@ -1,6 +1,5 @@
package com.Acrobot.ChestShop.Listeners.PreShopCreation;
import com.Acrobot.Breeze.Utils.QuantityUtil;
import com.Acrobot.ChestShop.Configuration.Properties;
import com.Acrobot.ChestShop.Events.PreShopCreationEvent;
import com.Acrobot.ChestShop.Signs.ChestShopSign;
@ -20,7 +19,7 @@ public class QuantityChecker implements Listener {
int amount = -1;
try {
amount = ChestShopSign.getQuantity(event.getSignLines());
} catch (NumberFormatException notANumber) {}
} catch (NumberFormatException ignored) {} // not a quantity on the line
if (amount < 1 || amount > Properties.MAX_SHOP_AMOUNT) {
event.setOutcome(INVALID_QUANTITY);