SteamWar/BungeeCore
Archiviert
13
2
Dieser Commit ist enthalten in:
Chaoscaot 2020-12-28 19:16:51 +01:00
Ursprung 065ab72625
Commit a2169ec3e1
4 geänderte Dateien mit 8 neuen und 10 gelöschten Zeilen

Datei anzeigen

@ -91,9 +91,9 @@ public class EventCommand extends BasicCommand {
e.getEventName());
Set<Team> teams = TeamTeilnahme.getTeams(e.getEventID());
if(!teams.isEmpty()){
StringBuilder tline = new StringBuilder("§7 Mit§8: §e");
StringBuilder tline = new StringBuilder("§7 Mit§8: ");
for(Team t : teams){
tline.append(t.getTeamKuerzel()).append(" ");
tline.append("§").append(t.getTeamColor()).append(t.getTeamKuerzel()).append(" ");
}
BungeeCore.send(player, tline.toString());
}

Datei anzeigen

@ -402,7 +402,7 @@ public class TeamCommand extends BasicCommand {
return;
}
BungeeCore.send(player, "§7Team §e" + team.getTeamName() + " §8[§e" + team.getTeamKuerzel() + "§8]");
BungeeCore.send(player, "§7Team §e" + team.getTeamName() + " §8[§" + team.getTeamColor() + team.getTeamKuerzel() + "§8]");
BungeeCore.send(player, "§7Leader§8: " + SteamwarUser.get(team.getTeamLeader()).getUserName());
if(team.getMembers().size() > 1) {
@ -454,7 +454,7 @@ public class TeamCommand extends BasicCommand {
for(int i = (page-1) * TEAMS_PER_PAGE; i < (page-1) * TEAMS_PER_PAGE + TEAMS_PER_PAGE && i < all.size(); i++){
Team tm = all.get(i);
BungeeCore.send(player,
"§8" + tm.getTeamKuerzel() + " §e" + tm.getTeamName() + " §8[§7" + SteamwarUser.get(tm.getTeamLeader()).getUserName() + "§8]",
"§" + tm.getTeamColor() + tm.getTeamKuerzel() + " §e" + tm.getTeamName() + " §8[§7" + SteamwarUser.get(tm.getTeamLeader()).getUserName() + "§8]",
"§7Teaminfo",
new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/team info " + tm.getTeamKuerzel()));
}
@ -531,8 +531,9 @@ public class TeamCommand extends BasicCommand {
List<SWListInv.SWListEntry<String>> colors = new ArrayList<>();
COLOR_CODES.forEach(stringSWListEntry -> colors.add(new SWListInv.SWListEntry<>(stringSWListEntry.getItem().setName(stringSWListEntry.getItem().getTitle() + Team.get(user.getTeam()).getTeamKuerzel()), stringSWListEntry.getObject())));
SWListInv<String> inv = new SWListInv<>(player, "§6Farbe wählen", colors, (click, element) -> {
SWListInv.closeInventory(player);
SWListInv<String> inv = new SWListInv<>(player, "§6Farbe wählen", colors, (click, element) -> {});
inv.setCallback((click, element) -> {
inv.close();
team.setTeamColor(element);
});
inv.open();

Datei anzeigen

@ -144,8 +144,4 @@ public class SWListInv<T> extends SWInventory {
return object;
}
}
public static void closeInventory(ProxiedPlayer player) {
new CloseInventoryPacket(SteamwarUser.get(player).getId()).send(player);
}
}

Datei anzeigen

@ -150,6 +150,7 @@ public class Team {
public void setTeamColor(String teamColor) {
this.teamColor = teamColor;
updateDB();
}
public int size(){