From c24c19f5f596f1e10d3e5169c6da3aa3f3a6cdae Mon Sep 17 00:00:00 2001 From: TfT_02 Date: Thu, 31 Jul 2014 22:37:22 +0200 Subject: [PATCH] Increase attempt counter after the apply --- .../nossr50/runnables/player/PlayerProfileLoadingTask.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/runnables/player/PlayerProfileLoadingTask.java b/src/main/java/com/gmail/nossr50/runnables/player/PlayerProfileLoadingTask.java index a1b0babfc..98312c485 100644 --- a/src/main/java/com/gmail/nossr50/runnables/player/PlayerProfileLoadingTask.java +++ b/src/main/java/com/gmail/nossr50/runnables/player/PlayerProfileLoadingTask.java @@ -51,8 +51,6 @@ public class PlayerProfileLoadingTask extends BukkitRunnable { player.sendMessage(LocaleLoader.getString("Profile.Loading.Start")); } - // Increment attempt counter and try - attempt++; PlayerProfile profile = mcMMO.getDatabaseManager().loadPlayerProfile(player.getName(), player.getUniqueId(), true); // If successful, schedule the apply if (profile.isLoaded()) { @@ -63,6 +61,9 @@ public class PlayerProfileLoadingTask extends BukkitRunnable { return; } + // Increment attempt counter and try + attempt++; + // If we've failed five times, give up if (attempt >= MAX_TRIES) { mcMMO.p.getLogger().severe("Giving up on attempting to load the PlayerProfile for " + player.getName());