mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 14:46:46 +01:00
Add message to /mcscoreboard keep when a board is not shown
This commit is contained in:
parent
c6ca65f5c9
commit
bd611ee11c
@ -35,6 +35,10 @@ public class McscoreboardCommand implements TabExecutor {
|
|||||||
sender.sendMessage(LocaleLoader.getString("Commands.Disabled"));
|
sender.sendMessage(LocaleLoader.getString("Commands.Disabled"));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (!ScoreboardManager.isBoardShown(sender.getName())) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.Scoreboard.NoBoard"));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
ScoreboardManager.keepBoard(sender.getName());
|
ScoreboardManager.keepBoard(sender.getName());
|
||||||
sender.sendMessage(LocaleLoader.getString("Commands.Scoreboard.Keep"));
|
sender.sendMessage(LocaleLoader.getString("Commands.Scoreboard.Keep"));
|
||||||
}
|
}
|
||||||
|
@ -371,14 +371,16 @@ public class ScoreboardManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean isBoardShown(String playerName) {
|
||||||
|
return PLAYER_SCOREBOARDS.get(playerName).isBoardShown();
|
||||||
|
}
|
||||||
|
|
||||||
public static void clearBoard(String playerName) {
|
public static void clearBoard(String playerName) {
|
||||||
PLAYER_SCOREBOARDS.get(playerName).tryRevertBoard();
|
PLAYER_SCOREBOARDS.get(playerName).tryRevertBoard();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void keepBoard(String playerName) {
|
public static void keepBoard(String playerName) {
|
||||||
if (Config.getInstance().getAllowKeepBoard()) {
|
PLAYER_SCOREBOARDS.get(playerName).cancelRevert();
|
||||||
PLAYER_SCOREBOARDS.get(playerName).cancelRevert();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setRevertTimer(String playerName, int seconds) {
|
public static void setRevertTimer(String playerName, int seconds) {
|
||||||
|
@ -524,13 +524,14 @@ Commands.Reset.All=[[GREEN]]All of your skill levels have been reset successfull
|
|||||||
Commands.Reset.Single=[[GREEN]]Your {0} skill level has been reset successfully.
|
Commands.Reset.Single=[[GREEN]]Your {0} skill level has been reset successfully.
|
||||||
Commands.Reset=[[RED]]Reset a skill's level to 0
|
Commands.Reset=[[RED]]Reset a skill's level to 0
|
||||||
Commands.Scoreboard.Clear=[[DARK_AQUA]]mcMMO scoreboard cleared.
|
Commands.Scoreboard.Clear=[[DARK_AQUA]]mcMMO scoreboard cleared.
|
||||||
|
Commands.Scoreboard.NoBoard=[[RED]]The mcMMO scoreboard is not active.
|
||||||
Commands.Scoreboard.Keep=[[DARK_AQUA]]The mcMMO scoreboard will stay up until you use [[GREEN]]/mcscoreboard clear[[DARK_AQUA]].
|
Commands.Scoreboard.Keep=[[DARK_AQUA]]The mcMMO scoreboard will stay up until you use [[GREEN]]/mcscoreboard clear[[DARK_AQUA]].
|
||||||
#Commands.Scoreboard.Timer=[[BLUE]]This scoreboard will remain visible for [[GOLD]]{1}[[BLUE]] seconds.
|
#Commands.Scoreboard.Timer=[[BLUE]]This scoreboard will remain visible for [[GOLD]]{1}[[BLUE]] seconds.
|
||||||
Commands.Scoreboard.Help.0=[[GOLD]] == [[GREEN]]Help for [[RED]]/mcscoreboard[[GOLD]] ==
|
Commands.Scoreboard.Help.0=[[GOLD]] == [[GREEN]]Help for [[RED]]/mcscoreboard[[GOLD]] ==
|
||||||
Commands.Scoreboard.Help.1=[[DARK_AQUA]]/mcscoreboard[[AQUA]] clear [[WHITE]] - clear the McMMO scoreboard
|
Commands.Scoreboard.Help.1=[[DARK_AQUA]]/mcscoreboard[[AQUA]] clear [[WHITE]] - clear the McMMO scoreboard
|
||||||
Commands.Scoreboard.Help.2=[[DARK_AQUA]]/mcscoreboard[[AQUA]] keep [[WHITE]] - keep the mcMMO scoreboard up
|
Commands.Scoreboard.Help.2=[[DARK_AQUA]]/mcscoreboard[[AQUA]] keep [[WHITE]] - keep the mcMMO scoreboard up
|
||||||
Commands.Scoreboard.Help.3=[[DARK_AQUA]]/mcscoreboard[[AQUA]] time [n] [[WHITE]] - clear the McMMO scoreboard after [[LIGHT_PURPLE]]n[[WHITE]] seconds
|
Commands.Scoreboard.Help.3=[[DARK_AQUA]]/mcscoreboard[[AQUA]] time [n] [[WHITE]] - clear the McMMO scoreboard after [[LIGHT_PURPLE]]n[[WHITE]] seconds
|
||||||
Commands.Scoreboard.Tip.Keep=[[GOLD]]Tip: Use [[RED]]/mcscoreboard keep[[GOLD]] to keep the scoreboard from going away.
|
Commands.Scoreboard.Tip.Keep=[[GOLD]]Tip: Use [[RED]]/mcscoreboard keep[[GOLD]] while the scoreboard is shown to keep it from going away.
|
||||||
Commands.Scoreboard.Tip.Clear=[[GOLD]]Tip: Use [[RED]]/mcscoreboard clear[[GOLD]] to get rid of the scoreboard.
|
Commands.Scoreboard.Tip.Clear=[[GOLD]]Tip: Use [[RED]]/mcscoreboard clear[[GOLD]] to get rid of the scoreboard.
|
||||||
Commands.Skill.Invalid=[[RED]]That is not a valid skillname!
|
Commands.Skill.Invalid=[[RED]]That is not a valid skillname!
|
||||||
Commands.Skill.Leaderboard=[[YELLOW]]--mcMMO [[BLUE]]{0}[[YELLOW]] Leaderboard--
|
Commands.Skill.Leaderboard=[[YELLOW]]--mcMMO [[BLUE]]{0}[[YELLOW]] Leaderboard--
|
||||||
|
Loading…
Reference in New Issue
Block a user