Attempt clean recovery from an unloaded PlayerProfile

This change should cause McMMOPlayer to create a graceful recovery when the database is temporarily unavailable.
When a McMMOPlayer is constructed and recieves an unloaded PlayerProfile, it schedules a task to re-attempt profile retrieval. This task can run for a maximum of 5 seconds, after which a second warning is printed indicating that it has given up (and a message given to the user).
This commit is contained in:
riking
2013-10-05 15:43:14 -07:00
committed by TfT_02
parent c9858dfd49
commit 14ae1a69c4
2 changed files with 71 additions and 0 deletions

View File

@ -772,3 +772,9 @@ Scoreboard.Misc.Level=Level
Scoreboard.Misc.CurrentXP=Current XP
Scoreboard.Misc.RemainingXP=Remaining XP
Scoreboard.Misc.Overall=Overall
#DATABASE RECOVERY
Recovery.Notice=[[RED]]Notice: mcMMO was [[DARK_RED]]unable to load your data.[[RED]] Retrying 5 times...
Recovery.Success=[[GREEN]]Success! Your mcMMO data was loaded.
Recovery.Failure=[[RED]]mcMMO still cannot load your data. You may want to [[AQUA]]contact the server owner.\n[[YELLOW]]You can still play on the server, but you will have [[BOLD]]no mcMMO levels[[YELLOW]] and any XP you get [[BOLD]]will not be saved[[YELLOW]].
Recovery.AdminFailureNotice=[[DARK_RED]][A][[RED]] mcMMO was unable to load the player data for [[YELLOW]]{0}[[RED]]. [[LIGHT_PURPLE]]Please inspect your database setup.