mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-24 17:39:52 -05:00
Unload all shops when shutting down
Former-commit-id: d6fb9596b4907e57889059b03024b8ad04f46141 [formerly 10db27cba2229378e4ab1355dd1c5578435df202] Former-commit-id: b979f8e2032cf91af1bd3cce0b069829ef35dafe
This commit is contained in:
1 parent
e637045c2e
commit
1e884ddfa6
3 files changed
+17
-2
No files matched your search
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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:"
|
||||
|
||||
Reference in new issue
Block a user