mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-01-19 06:01:48 +01:00
Trim player names to 16 chars when needed.
This commit is contained in:
parent
5c4c3cf59c
commit
6d6bc3de76
@ -278,6 +278,10 @@ public class ScoreboardManager {
|
||||
String playerName = stat.get(1);
|
||||
playerName = (playerName.equals(player.getName()) ? ChatColor.GOLD : "") + playerName;
|
||||
|
||||
if (playerName.length() > 16) {
|
||||
playerName = playerName.substring(0, 16);
|
||||
}
|
||||
|
||||
objective.getScore(server.getOfflinePlayer(playerName)).setScore(Integer.valueOf(stat.get(0)));
|
||||
}
|
||||
}
|
||||
@ -286,6 +290,10 @@ public class ScoreboardManager {
|
||||
String playerName = stat.name;
|
||||
playerName = (playerName.equals(player.getName()) ? ChatColor.GOLD : "") + playerName;
|
||||
|
||||
if (playerName.length() > 16) {
|
||||
playerName = playerName.substring(0, 16);
|
||||
}
|
||||
|
||||
objective.getScore(server.getOfflinePlayer(playerName)).setScore(stat.statVal);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user