diff --git a/src/main/java/com/Acrobot/ChestShop/Listeners/Player/PlayerInteract.java b/src/main/java/com/Acrobot/ChestShop/Listeners/Player/PlayerInteract.java index 25b4762ef..2e8af12d2 100644 --- a/src/main/java/com/Acrobot/ChestShop/Listeners/Player/PlayerInteract.java +++ b/src/main/java/com/Acrobot/ChestShop/Listeners/Player/PlayerInteract.java @@ -150,10 +150,10 @@ private static void showShopInfo(Player player, Sign sign) { player.sendMessage(Messages.prefix(Messages.SHOP_OWNER_INFO)); Collection accessors = ChestShopSign.getAccessors(sign); StringBuilder accessorNames = new StringBuilder(); - for (String string : accessors) { + for (String accessorUUID : accessors) { if (!accessorNames.isEmpty()) accessorNames.append(", "); - accessorNames.append(NameManager.getFullNameFor(UUID.fromString(string))); + accessorNames.append(NameManager.getFullNameFor(UUID.fromString(accessorUUID))); } player.sendMessage(" " + Messages.SHOP_ACCESSORS.replace("%accessor_list", accessorNames.toString())); diff --git a/src/main/java/com/Acrobot/ChestShop/Signs/ChestShopSign.java b/src/main/java/com/Acrobot/ChestShop/Signs/ChestShopSign.java index 0e8e698aa..07baaa234 100644 --- a/src/main/java/com/Acrobot/ChestShop/Signs/ChestShopSign.java +++ b/src/main/java/com/Acrobot/ChestShop/Signs/ChestShopSign.java @@ -163,6 +163,9 @@ public static Collection getAccessors(Sign sign) { return new HashSet<>(); String data = persistentDataContainer.get(ACCESSORS_NAMESPACED_KEY, PersistentDataType.STRING); + if (data.isEmpty()) + return new HashSet<>(); + String[] split = data.split(";"); return new HashSet<>(Arrays.asList(split));