diff --git a/pom.xml b/pom.xml
index f93a60c..386c2ba 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2,7 +2,7 @@
4.0.0
me.kristoffer
vanillaplus
- 1.2.0
+ 1.2.1
VanillaPlus
diff --git a/src/main/java/me/kristoffer/vanillaplus/modules/Nametag.java b/src/main/java/me/kristoffer/vanillaplus/modules/Nametag.java
index 1ef3158..3f10090 100644
--- a/src/main/java/me/kristoffer/vanillaplus/modules/Nametag.java
+++ b/src/main/java/me/kristoffer/vanillaplus/modules/Nametag.java
@@ -138,10 +138,10 @@ public void onJoin(PlayerJoinEvent event) {
private void updateName(Player player, AsyncPlayerChatEvent chatEvent) {
Scoreboard sb = Bukkit.getServer().getScoreboardManager().getMainScoreboard();
- Team team = sb.getEntryTeam(player.getName());
- if (!(sb.getEntryTeam(player.getName()) != null)) {
- return;
+ if (sb.getEntryTeam(player.getName()) == null) {
+ sb.getTeam("cf").addEntry(player.getName());
}
+ Team team = sb.getEntryTeam(player.getName());
player.setPlayerListName(team.getPrefix() + player.getName());
if (team.getName().equals("rainbow")) {
if (chatEvent != null) {
@@ -158,7 +158,8 @@ private void updateName(Player player, AsyncPlayerChatEvent chatEvent) {
team.getColor() + player.getDisplayName() + ChatColor.RESET + ": " + chatEvent.getMessage());
}
if (afkPlayers.contains(player.getName())) {
- player.setPlayerListName(ChatColor.YELLOW + "[AFK] " + team.getPrefix() + player.getName());
+ player.setPlayerListName(
+ ChatColor.YELLOW + "[AFK] " + team.getColor() + team.getPrefix() + player.getName());
}
}
}