Only show the scoreboard tips a couple of times

We can assume a player knows how scoreboards work after showing them
the tips a few times across multiple login sessions

Adds #1833
This commit is contained in:
TfT_02
2014-02-09 18:12:00 +01:00
parent a2c395db36
commit eda18bc990
8 changed files with 88 additions and 14 deletions

View File

@ -199,6 +199,13 @@ public class ScoreboardWrapper {
// TODO is there any way to do the time that looks acceptable?
// player.sendMessage(LocaleLoader.getString("Commands.Scoreboard.Timer", StringUtils.capitalize(sidebarType.toString().toLowerCase()), ticks / 20F));
PlayerProfile profile = UserManager.getPlayer(player).getProfile();
if (profile.getScoreboardTipsShown() >= Config.getInstance().getTipsAmount()) {
return;
}
if (!tippedKeep) {
tippedKeep = true;
player.sendMessage(LocaleLoader.getString("Commands.Scoreboard.Tip.Keep"));
@ -206,6 +213,7 @@ public class ScoreboardWrapper {
else if (!tippedClear) {
tippedClear = true;
player.sendMessage(LocaleLoader.getString("Commands.Scoreboard.Tip.Clear"));
profile.increaseTipsShown();
}
}