mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 07:06:45 +01:00
Add more debug messages in onDisable()
So that we can track down why the disable proces slows down
This commit is contained in:
parent
383b048fef
commit
b460f7a564
@ -211,7 +211,9 @@ public class mcMMO extends JavaPlugin {
|
|||||||
}
|
}
|
||||||
catch (NullPointerException e) {}
|
catch (NullPointerException e) {}
|
||||||
|
|
||||||
|
debug("Canceling all tasks...");
|
||||||
getServer().getScheduler().cancelTasks(this); // This removes our tasks
|
getServer().getScheduler().cancelTasks(this); // This removes our tasks
|
||||||
|
debug("Unregister all events...");
|
||||||
HandlerList.unregisterAll(this); // Cancel event registrations
|
HandlerList.unregisterAll(this); // Cancel event registrations
|
||||||
|
|
||||||
if (Config.getInstance().getBackupsEnabled()) {
|
if (Config.getInstance().getBackupsEnabled()) {
|
||||||
|
@ -526,6 +526,7 @@ public final class PartyManager {
|
|||||||
|
|
||||||
YamlConfiguration partiesFile = new YamlConfiguration();
|
YamlConfiguration partiesFile = new YamlConfiguration();
|
||||||
|
|
||||||
|
mcMMO.p.debug("Saving Parties... (" + parties.size() + ")");
|
||||||
for (Party party : parties) {
|
for (Party party : parties) {
|
||||||
String partyName = party.getName();
|
String partyName = party.getName();
|
||||||
|
|
||||||
|
@ -134,6 +134,7 @@ public final class HolidayManager {
|
|||||||
|
|
||||||
// This gets called onDisable
|
// This gets called onDisable
|
||||||
public void saveAnniversaryFiles() {
|
public void saveAnniversaryFiles() {
|
||||||
|
mcMMO.p.debug("Saving anniversary files...");
|
||||||
String anniversaryFilePath = mcMMO.getFlatFileDirectory() + "anniversary." + CURRENT_YEAR + ".yml";
|
String anniversaryFilePath = mcMMO.getFlatFileDirectory() + "anniversary." + CURRENT_YEAR + ".yml";
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -151,6 +151,7 @@ public class FormulaManager {
|
|||||||
* Save formula file.
|
* Save formula file.
|
||||||
*/
|
*/
|
||||||
public void saveFormula() {
|
public void saveFormula() {
|
||||||
|
mcMMO.p.debug("Saving previous XP formula type...");
|
||||||
YamlConfiguration formulasFile = new YamlConfiguration();
|
YamlConfiguration formulasFile = new YamlConfiguration();
|
||||||
formulasFile.set("Previous_Formula", previousFormula.toString());
|
formulasFile.set("Previous_Formula", previousFormula.toString());
|
||||||
|
|
||||||
|
@ -57,6 +57,7 @@ public final class UserManager {
|
|||||||
* Save all users.
|
* Save all users.
|
||||||
*/
|
*/
|
||||||
public static void saveAll() {
|
public static void saveAll() {
|
||||||
|
mcMMO.p.debug("Saving mcMMOPlayers... (" + players.size() + ")");
|
||||||
for (McMMOPlayer mcMMOPlayer : players.values()) {
|
for (McMMOPlayer mcMMOPlayer : players.values()) {
|
||||||
mcMMOPlayer.getProfile().save();
|
mcMMOPlayer.getProfile().save();
|
||||||
}
|
}
|
||||||
|
@ -161,7 +161,9 @@ public class ScoreboardManager {
|
|||||||
|
|
||||||
// Called in onDisable()
|
// Called in onDisable()
|
||||||
public static void teardownAll() {
|
public static void teardownAll() {
|
||||||
for (Player player : mcMMO.p.getServer().getOnlinePlayers()) {
|
Player[] onlinePlayers = mcMMO.p.getServer().getOnlinePlayers();
|
||||||
|
mcMMO.p.debug("Tearing down scoreboards... (" + onlinePlayers.length + ")");
|
||||||
|
for (Player player : onlinePlayers) {
|
||||||
teardownPlayer(player);
|
teardownPlayer(player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user