From d51f52af9e5bf05a59c9e5fb862ad8dcbb663eb4 Mon Sep 17 00:00:00 2001 From: Andrzej Pomirski Date: Mon, 10 Feb 2014 12:03:13 +0100 Subject: [PATCH] Fix items with name longer than then sign can handle --- .../ChestShop/Listeners/PreShopCreation/ItemChecker.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/Acrobot/ChestShop/Listeners/PreShopCreation/ItemChecker.java b/src/main/java/com/Acrobot/ChestShop/Listeners/PreShopCreation/ItemChecker.java index 4919d4f..0afaf1f 100644 --- a/src/main/java/com/Acrobot/ChestShop/Listeners/PreShopCreation/ItemChecker.java +++ b/src/main/java/com/Acrobot/ChestShop/Listeners/PreShopCreation/ItemChecker.java @@ -51,7 +51,7 @@ public class ItemChecker implements Listener { String[] parts = itemCode.split("(?=:|-|#)", 2); String data = (parts.length > 1 ? parts[1] : ""); - if (!data.isEmpty() && code.length() > (MAXIMUM_SIGN_LETTERS - data.length())) { + if (code.length() > (MAXIMUM_SIGN_LETTERS - data.length())) { code = code.substring(0, MAXIMUM_SIGN_LETTERS - data.length()); }