SteamWar/BungeeCore
Archiviert
13
2

Add UserGroup shortforms
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
yoyosource 2022-03-10 19:00:46 +01:00
Ursprung 621cb64fb3
Commit 54753ce1f8
2 geänderte Dateien mit 15 neuen und 9 gelöschten Zeilen

Datei anzeigen

@ -76,7 +76,7 @@ public class ConnectionListener extends BasicListener {
if(user.getUserGroup() != UserGroup.Member) {
player.setPermission(YOUTUBER_MODS, true);
player.setDisplayName(user.getUserGroup().getColorCode() + user.getUserGroup().name() + " " + player.getName() + "§r");
player.setDisplayName(user.getUserGroup().getColorCode() + user.getUserGroup().getChatPrefix() + " " + player.getName() + "§r");
player.setPermission("bungeecore.group." + user.getUserGroup().name().toLowerCase(), true);
}else {
player.setDisplayName(player.getName());

Datei anzeigen

@ -24,24 +24,26 @@ import java.util.stream.Collectors;
public enum UserGroup {
Admin("§4", "§e", true, true, true, true),
Developer("§3", "§f", true, true, true, true),
Moderator("§c", "§f", true, true, true, true),
Supporter("§9", "§f", false, true, true, true),
Builder("§2", "§f", false, true, false, true),
YouTuber("§5", "§f", false, false, false, true),
Member("§7", "§7", false, false, false, false);
Admin("§4", "§e", "Admin", true, true, true, true),
Developer("§3", "§f", "Dev", true, true, true, true),
Moderator("§c", "§f", "Mod", true, true, true, true),
Supporter("§9", "§f", "Sup", false, true, true, true),
Builder("§2", "§f", "Archi", false, true, false, true),
YouTuber("§5", "§f", "YT", false, false, false, true),
Member("§7", "§7", "", false, false, false, false);
private final String colorCode;
private final String chatColorCode;
private final String chatPrefix;
private final boolean adminGroup;
private final boolean teamGroup;
private final boolean checkSchematics;
private final boolean privilegedMods;
UserGroup(String colorCode, String chatColorCode, boolean adminGroup, boolean teamGroup, boolean checkSchematics, boolean privilegedMods) {
UserGroup(String colorCode, String chatColorCode, String chatPrefix, boolean adminGroup, boolean teamGroup, boolean checkSchematics, boolean privilegedMods) {
this.colorCode = colorCode;
this.chatColorCode = chatColorCode;
this.chatPrefix = chatPrefix;
this.adminGroup = adminGroup;
this.teamGroup = teamGroup;
this.checkSchematics = checkSchematics;
@ -75,4 +77,8 @@ public enum UserGroup {
public static UserGroup getUsergroup(String name) {
return Arrays.stream(UserGroup.values()).filter(userGroup -> userGroup.name().equalsIgnoreCase(name)).collect(Collectors.toList()).get(0);
}
public String getChatPrefix() {
return chatPrefix;
}
}