feat,refactor: team joiner plugin and some refactoring

This commit is contained in:
ChomeNS
2024-12-04 19:49:24 +07:00
parent 20cd93a826
commit bd4ceda4f1
9 changed files with 115 additions and 18 deletions

View File

@@ -120,7 +120,10 @@ public class ChatPlugin extends Bot.Listener {
case 4 -> Component.translatable("%s", name, message); // paper chat type thingy
case 5 -> Component.translatable("chat.type.announcement", name, message); // /say
case 6, 7 -> {
final Team botTeam = bot.team.teamsByPlayer.get(bot.profile.getName());
final Team botTeam = bot.team.findTeamByMember(bot.profile.getName());
if (botTeam == null) yield null;
final Component botTeamDisplayName = Component
.translatable("chat.square_brackets")
.arguments(botTeam.displayName)