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 93245cc04..e9df38813 100644 --- a/src/main/java/com/Acrobot/ChestShop/Listeners/Player/PlayerInteract.java +++ b/src/main/java/com/Acrobot/ChestShop/Listeners/Player/PlayerInteract.java @@ -135,8 +135,9 @@ private static void showShopInfo(Player player, Sign sign) { } ChestShopMetaData chestShopMetaData = ChestShopSign.getChestShopMetaData(sign); - if (chestShopMetaData == null) + if (chestShopMetaData == null) { return; + } ItemStack item = chestShopMetaData.getItemStack(); @@ -144,16 +145,19 @@ private static void showShopInfo(Player player, Sign sign) { if (!chestShopMetaData.isAdminshop()) { if (chestShopMetaData.isOwner(player) || Permission.has(player, Permission.MOD)) { - player.sendMessage(Messages.prefix(Messages.SHOP_OWNER_INFO)); Collection accessors = chestShopMetaData.getAccessors(); - StringBuilder accessorNames = new StringBuilder(); - for (UUID accessorUUID : accessors) { - if (!accessorNames.isEmpty()) - accessorNames.append(", "); - accessorNames.append(NameManager.getFullNameFor(accessorUUID)); + if (!accessors.isEmpty()) { + player.sendMessage(Messages.prefix(Messages.SHOP_OWNER_INFO)); + StringBuilder accessorNames = new StringBuilder(); + for (UUID accessorUUID : accessors) { + if (!accessorNames.isEmpty()) { + accessorNames.append(", "); + } + accessorNames.append(NameManager.getFullNameFor(accessorUUID)); + } + + player.sendMessage(" " + Messages.SHOP_ACCESSORS.replace("%accessor_list", accessorNames.toString())); } - - player.sendMessage(" " + Messages.SHOP_ACCESSORS.replace("%accessor_list", accessorNames.toString())); } Container chest = uBlock.findConnectedChest(sign, true); @@ -187,8 +191,9 @@ private static PreTransactionEvent preparePreTransactionEvent(Sign sign, Player } ChestShopMetaData chestShopMetaData = ChestShopSign.getChestShopMetaData(sign); - if (chestShopMetaData == null) + if (chestShopMetaData == null) { return null; + } UUID uuid = chestShopMetaData.getOwner();