瀏覽代碼

Revert "Increase attempt counter after the apply"

This reverts commit c24c19f5f596f1e10d3e5169c6da3aa3f3a6cdae.
TfT_02 11 年之前
父節點
當前提交
23cbfc9038
共有 1 個文件被更改,包括 2 次插入3 次删除
  1. 2 3
      src/main/java/com/gmail/nossr50/runnables/player/PlayerProfileLoadingTask.java

+ 2 - 3
src/main/java/com/gmail/nossr50/runnables/player/PlayerProfileLoadingTask.java

@@ -51,6 +51,8 @@ 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()) {
@@ -61,9 +63,6 @@ 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());