diff --git a/src/main/java/org/maxgamer/quickshop/QuickShop.java b/src/main/java/org/maxgamer/quickshop/QuickShop.java index 9d3eb3a2b..b7622261d 100644 --- a/src/main/java/org/maxgamer/quickshop/QuickShop.java +++ b/src/main/java/org/maxgamer/quickshop/QuickShop.java @@ -778,9 +778,16 @@ public class QuickShop extends JavaPlugin { if (noopDisable) return; getLogger().info("QuickShop is finishing remaining works, this may need a while..."); + Iterator shopIterator = shopManager.getShopIterator(); + while (shopIterator.hasNext()) { + Shop shop = (Shop) shopIterator.next(); + if (shop.isLoaded()) + shop.onUnload(); + } for (Player player : Bukkit.getOnlinePlayers()) { player.closeInventory(); } + /* Stop queue processor */ this.getDatabaseManager().uninit(); this.getQueuedShopManager().uninit(); diff --git a/src/main/java/org/maxgamer/quickshop/Util/MsgUtil.java b/src/main/java/org/maxgamer/quickshop/Util/MsgUtil.java index e71f8f5e4..f29770950 100644 --- a/src/main/java/org/maxgamer/quickshop/Util/MsgUtil.java +++ b/src/main/java/org/maxgamer/quickshop/Util/MsgUtil.java @@ -266,6 +266,12 @@ public class MsgUtil { selectedVersion = 14; messagei18n.save(messageFile); } + if (selectedVersion == 14) { + messagei18n.set("flush-finished", "&aSuccessfully flushed the messages."); + messagei18n.set("language-version", 15); + selectedVersion = 15; + messagei18n.save(messageFile); + } } public static void sendControlPanelInfo(@NotNull CommandSender sender, @NotNull Shop shop) { @@ -652,7 +658,7 @@ public class MsgUtil { plugin.getDatabaseHelper().cleanMessageForPlayer(plugin.getDatabase(), pName); msgs.clear(); } else { - p.getPlayer().sendMessage(getMessage("nothing-to-flush")); + //p.getPlayer().sendMessage(getMessage("nothing-to-flush")); } return true; } diff --git a/src/main/resources/messages-en.yml b/src/main/resources/messages-en.yml index a3849c7b5..22e004555 100644 --- a/src/main/resources/messages-en.yml +++ b/src/main/resources/messages-en.yml @@ -11,7 +11,7 @@ translation-version: "&c&lSupport Version: &b&lReremake" translation-country: "&c&lLanguage Zone: &b&lEnglish (en_US)" # ====================================================================== -language-version: 12 +language-version: 15 not-looking-at-shop: "&cNo QuickShop found. You must be looking at one." no-anythings-in-your-hand: "&cNo anythings in your hand." @@ -72,6 +72,8 @@ shop-staff-added: "&aSuccessfully add {0} to your shop staffs." shop-staff-deleted: "&aSuccessfully remove {0} to your shop staffs." no-permission-build: "&cYou can't build shop here." success-change-owner-to-server: "&aSuccessfully set shop owner to Server." +flush-finished: "&aSuccessfully flushed the messages." + menu: successful-purchase: "&aSuccessfully Purchased:"