mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-29 16:46:46 +01:00
Fix formatting
This commit is contained in:
parent
2286728308
commit
635f2bdb43
@ -32,14 +32,16 @@ public class PlayerProfileLoadingTask extends BukkitRunnable {
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
lock.lock();
|
lock.lock();
|
||||||
|
|
||||||
if (this.cancelled) {
|
if (this.cancelled) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Quit if they logged out
|
// Quit if they logged out
|
||||||
if (!player.isOnline()) {
|
if (!player.isOnline()) {
|
||||||
mcMMO.p.getLogger().info("Aborting profile loading recovery for " + player.getName() + " - player logged out");
|
mcMMO.p.getLogger().info("Aborting profile loading recovery for " + player.getName() + " - player logged out");
|
||||||
this.cancel();
|
this.cancel();
|
||||||
cancelled = true;
|
cancelled = true;
|
||||||
lock.unlock();
|
lock.unlock();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -63,8 +65,8 @@ public class PlayerProfileLoadingTask extends BukkitRunnable {
|
|||||||
|
|
||||||
// If we've failed five times, give up
|
// If we've failed five times, give up
|
||||||
if (attempt >= MAX_TRIES) {
|
if (attempt >= MAX_TRIES) {
|
||||||
mcMMO.p.getLogger().severe("Giving up on attempting to load the PlayerProfile for " + player.getName() );
|
mcMMO.p.getLogger().severe("Giving up on attempting to load the PlayerProfile for " + player.getName());
|
||||||
mcMMO.p.getServer().broadcast(LocaleLoader.getString("Profile.Loading.AdminFailureNotice", player.getName() ), Server.BROADCAST_CHANNEL_ADMINISTRATIVE);
|
mcMMO.p.getServer().broadcast(LocaleLoader.getString("Profile.Loading.AdminFailureNotice", player.getName()), Server.BROADCAST_CHANNEL_ADMINISTRATIVE);
|
||||||
player.sendMessage(LocaleLoader.getString("Profile.Loading.Failure").split("\n"));
|
player.sendMessage(LocaleLoader.getString("Profile.Loading.Failure").split("\n"));
|
||||||
this.cancel();
|
this.cancel();
|
||||||
cancelled = true;
|
cancelled = true;
|
||||||
@ -89,11 +91,13 @@ public class PlayerProfileLoadingTask extends BukkitRunnable {
|
|||||||
mcMMO.p.getLogger().info("Aborting profile loading recovery for " + player.getName() + " - player logged out");
|
mcMMO.p.getLogger().info("Aborting profile loading recovery for " + player.getName() + " - player logged out");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
McMMOPlayer mcMMOPlayer = new McMMOPlayer(player, profile);
|
McMMOPlayer mcMMOPlayer = new McMMOPlayer(player, profile);
|
||||||
UserManager.track(mcMMOPlayer);
|
UserManager.track(mcMMOPlayer);
|
||||||
player.sendMessage(LocaleLoader.getString("Profile.Loading.Success"));
|
player.sendMessage(LocaleLoader.getString("Profile.Loading.Success"));
|
||||||
mcMMOPlayer.actualizeRespawnATS();
|
mcMMOPlayer.actualizeRespawnATS();
|
||||||
ScoreboardManager.setupPlayer(player);
|
ScoreboardManager.setupPlayer(player);
|
||||||
|
|
||||||
if (Config.getInstance().getShowStatsAfterLogin()) {
|
if (Config.getInstance().getShowStatsAfterLogin()) {
|
||||||
ScoreboardManager.enablePlayerStatsScoreboard(player);
|
ScoreboardManager.enablePlayerStatsScoreboard(player);
|
||||||
new McScoreboardKeepTask(player).runTaskLater(mcMMO.p, 1 * Misc.TICK_CONVERSION_FACTOR);
|
new McScoreboardKeepTask(player).runTaskLater(mcMMO.p, 1 * Misc.TICK_CONVERSION_FACTOR);
|
||||||
|
Loading…
Reference in New Issue
Block a user