fix: some team stuff

This commit is contained in:
ChomeNS
2024-12-10 08:23:38 +07:00
parent 24b7ada58f
commit 935dfdcb32
3 changed files with 19 additions and 1 deletions

View File

@@ -3,6 +3,7 @@ package me.chayapak1.chomens_bot.plugins;
import me.chayapak1.chomens_bot.Bot;
import me.chayapak1.chomens_bot.data.Team;
import me.chayapak1.chomens_bot.util.UUIDUtilities;
import org.geysermc.mcprotocollib.network.event.session.ConnectedEvent;
import java.util.ArrayList;
@@ -16,9 +17,20 @@ public class TeamJoinerPlugin extends TickPlugin.Listener {
this.bot = bot;
this.teamName = bot.config.teamName;
bot.addListener(new Bot.Listener() {
@Override
public void connected(ConnectedEvent event) {
TeamJoinerPlugin.this.connected();
}
});
bot.tick.addListener(this);
}
private void connected () {
addTeam();
}
@Override
public void onTick () {
try {