Skip to content

Commit

Permalink
Merge branch 'main' of github.com:Chief-Noob/Minecraft-Plugin
Browse files Browse the repository at this point in the history
* 'main' of github.com:Chief-Noob/Minecraft-Plugin:
  πŸ› [team] trying to fix team
  • Loading branch information
sleepymalc committed Aug 8, 2021
2 parents f781310 + 5efc840 commit 23909a8
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions src/main/java/com/linyuanlin/minecraft/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -170,18 +170,21 @@ public boolean onCommand(CommandSender sender, Command cmd, String cmdlable, Str
}
case "list": {
StringBuilder teamMemberNameString = new StringBuilder();
for (int i = 0; i < allPlayers.get(p1.getUniqueId()).team.get().size(); i++) {
teamMemberNameString
.append(allPlayers.get(p1.getUniqueId()).team.get().playerList.get(i).player.getName())
.append(" ");
Optional<Team> team = allPlayers.get(p1.getUniqueId()).team;

if (!team.isPresent()) {
p1.sendMessage("δ½ ζ²’ιšŠδΌζ‹‰");
return false;
}
TextComponent msg = new TextComponent("ιšŠδΌζˆε“‘οΌš" + teamMemberNameString);
for (int i = 0; i < allPlayers.get(p1.getUniqueId()).team.get().size(); i++) {
allPlayers.get(p1.getUniqueId()).team.get().playerList.get(i).player.spigot().sendMessage(msg);

for (PlayerData pd : team.get().playerList) {
teamMemberNameString.append(pd.player.getName()).append(" ");
}

TextComponent msg = new TextComponent("ιšŠδΌζˆε“‘οΌš" + teamMemberNameString);
p1.spigot().sendMessage(msg);
}
break;
break;
default:
break;
}
Expand Down

0 comments on commit 23909a8

Please sign in to comment.