Dieser Commit ist enthalten in:
Ursprung
621cb64fb3
Commit
54753ce1f8
@ -76,7 +76,7 @@ public class ConnectionListener extends BasicListener {
|
|||||||
|
|
||||||
if(user.getUserGroup() != UserGroup.Member) {
|
if(user.getUserGroup() != UserGroup.Member) {
|
||||||
player.setPermission(YOUTUBER_MODS, true);
|
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);
|
player.setPermission("bungeecore.group." + user.getUserGroup().name().toLowerCase(), true);
|
||||||
}else {
|
}else {
|
||||||
player.setDisplayName(player.getName());
|
player.setDisplayName(player.getName());
|
||||||
|
@ -24,24 +24,26 @@ import java.util.stream.Collectors;
|
|||||||
|
|
||||||
public enum UserGroup {
|
public enum UserGroup {
|
||||||
|
|
||||||
Admin("§4", "§e", true, true, true, true),
|
Admin("§4", "§e", "Admin", true, true, true, true),
|
||||||
Developer("§3", "§f", true, true, true, true),
|
Developer("§3", "§f", "Dev", true, true, true, true),
|
||||||
Moderator("§c", "§f", true, true, true, true),
|
Moderator("§c", "§f", "Mod", true, true, true, true),
|
||||||
Supporter("§9", "§f", false, true, true, true),
|
Supporter("§9", "§f", "Sup", false, true, true, true),
|
||||||
Builder("§2", "§f", false, true, false, true),
|
Builder("§2", "§f", "Archi", false, true, false, true),
|
||||||
YouTuber("§5", "§f", false, false, false, true),
|
YouTuber("§5", "§f", "YT", false, false, false, true),
|
||||||
Member("§7", "§7", false, false, false, false);
|
Member("§7", "§7", "", false, false, false, false);
|
||||||
|
|
||||||
private final String colorCode;
|
private final String colorCode;
|
||||||
private final String chatColorCode;
|
private final String chatColorCode;
|
||||||
|
private final String chatPrefix;
|
||||||
private final boolean adminGroup;
|
private final boolean adminGroup;
|
||||||
private final boolean teamGroup;
|
private final boolean teamGroup;
|
||||||
private final boolean checkSchematics;
|
private final boolean checkSchematics;
|
||||||
private final boolean privilegedMods;
|
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.colorCode = colorCode;
|
||||||
this.chatColorCode = chatColorCode;
|
this.chatColorCode = chatColorCode;
|
||||||
|
this.chatPrefix = chatPrefix;
|
||||||
this.adminGroup = adminGroup;
|
this.adminGroup = adminGroup;
|
||||||
this.teamGroup = teamGroup;
|
this.teamGroup = teamGroup;
|
||||||
this.checkSchematics = checkSchematics;
|
this.checkSchematics = checkSchematics;
|
||||||
@ -75,4 +77,8 @@ public enum UserGroup {
|
|||||||
public static UserGroup getUsergroup(String name) {
|
public static UserGroup getUsergroup(String name) {
|
||||||
return Arrays.stream(UserGroup.values()).filter(userGroup -> userGroup.name().equalsIgnoreCase(name)).collect(Collectors.toList()).get(0);
|
return Arrays.stream(UserGroup.values()).filter(userGroup -> userGroup.name().equalsIgnoreCase(name)).collect(Collectors.toList()).get(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getChatPrefix() {
|
||||||
|
return chatPrefix;
|
||||||
|
}
|
||||||
}
|
}
|
In neuem Issue referenzieren
Einen Benutzer sperren