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()); e.getEventName());
Set<Team> teams = TeamTeilnahme.getTeams(e.getEventID()); Set<Team> teams = TeamTeilnahme.getTeams(e.getEventID());
if(!teams.isEmpty()){ if(!teams.isEmpty()){
StringBuilder tline = new StringBuilder("§7 Mit§8: §e"); StringBuilder tline = new StringBuilder("§7 Mit§8: ");
for(Team t : teams){ for(Team t : teams){
tline.append(t.getTeamKuerzel()).append(" "); tline.append("§").append(t.getTeamColor()).append(t.getTeamKuerzel()).append(" ");
} }
BungeeCore.send(player, tline.toString()); BungeeCore.send(player, tline.toString());
} }

Datei anzeigen

@ -402,7 +402,7 @@ public class TeamCommand extends BasicCommand {
return; 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()); BungeeCore.send(player, "§7Leader§8: " + SteamwarUser.get(team.getTeamLeader()).getUserName());
if(team.getMembers().size() > 1) { 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++){ 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); Team tm = all.get(i);
BungeeCore.send(player, 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", "§7Teaminfo",
new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/team info " + tm.getTeamKuerzel())); 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<>(); 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()))); 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<String> inv = new SWListInv<>(player, "§6Farbe wählen", colors, (click, element) -> {});
SWListInv.closeInventory(player); inv.setCallback((click, element) -> {
inv.close();
team.setTeamColor(element); team.setTeamColor(element);
}); });
inv.open(); inv.open();

Datei anzeigen

@ -144,8 +144,4 @@ public class SWListInv<T> extends SWInventory {
return object; 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) { public void setTeamColor(String teamColor) {
this.teamColor = teamColor; this.teamColor = teamColor;
updateDB();
} }
public int size(){ public int size(){