Dieser Commit ist enthalten in:
Ursprung
3876f2619c
Commit
6f346591ea
@ -1 +1 @@
|
||||
Subproject commit 0fef6c0f8f5499cc3a74aea38d51abbe97ba11c2
|
||||
Subproject commit 4eadcb4b09c0747cd1726c7f6cfe86ff07e59ea2
|
@ -20,7 +20,7 @@
|
||||
package de.steamwar.core.events;
|
||||
|
||||
import de.steamwar.sql.SteamwarUser;
|
||||
import de.steamwar.sql.UserGroup;
|
||||
import de.steamwar.sql.UserPerm;
|
||||
import de.steamwar.sql.internal.Statement;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
@ -37,11 +37,11 @@ public class PlayerJoinedEvent implements Listener{
|
||||
Player player = event.getPlayer();
|
||||
SteamwarUser user = Statement.productionDatabase() ? SteamwarUser.get(player.getUniqueId()) : SteamwarUser.getOrCreate(player.getUniqueId(), player.getName(), uuid -> {}, (oldName, newName) -> {});
|
||||
|
||||
if(user.getUserGroup() != UserGroup.Member) {
|
||||
UserGroup group = user.getUserGroup();
|
||||
player.setDisplayName(group.getColorCode() + group.name() + " " + player.getName() + "§r");
|
||||
UserPerm.Prefix prefix = user.prefix();
|
||||
if(prefix != UserPerm.emptyPrefix) {
|
||||
player.setDisplayName(prefix.getColorCode() + prefix.getChatPrefix() + " " + player.getName() + "§r");
|
||||
} else
|
||||
player.setDisplayName(user.getUserGroup().getColorCode() + player.getName() + "§r");
|
||||
player.setDisplayName(prefix.getColorCode() + player.getName() + "§r");
|
||||
|
||||
event.setJoinMessage("§a§l» §r" + player.getDisplayName());
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren