Skip to content

Commit

Permalink
Saving users mysql stats before server shutdown on game end
Browse files Browse the repository at this point in the history
  • Loading branch information
Tigerpanzer02 committed Jan 15, 2024
1 parent 336b053 commit 70f8b7c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
### 1.3.7 Release (15.01.2024)
* Added playernames to FileStats
* Saving users mysql stats before server shutdown on game end
* Moved FoodLose/HungerLose to core
* Fixed LanguageMigrator file version fetching
* Fixed Java Heap Space issue when getProgressBar division zero
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ public void handleCall(PluginArena arena) {
arena.getMapRestorerManager().fullyRestoreArena();
if(plugin.getConfigPreferences().getOption("BUNGEEMODE")) {
if(ConfigUtils.getConfig(plugin, "bungee").getBoolean("Shutdown-When-Game-Ends")) {
for(Player player : Bukkit.getOnlinePlayers()) {
User user = plugin.getUserManager().getUser(player);
plugin.getUserManager().saveAllStatistic(user);
plugin.getUserManager().removeUser(user);
}
plugin.getServer().shutdown();
}
plugin.getArenaRegistry().shuffleBungeeArena();
Expand Down

0 comments on commit 70f8b7c

Please sign in to comment.