fix: add login checks before sending packet when the state is not PLAY
This commit is contained in:
@@ -266,10 +266,14 @@ public class ChatPlugin extends Bot.Listener {
|
||||
}
|
||||
|
||||
public void sendCommandInstantly (String command) {
|
||||
if (!bot.loggedIn) return;
|
||||
|
||||
bot.session.send(new ServerboundChatCommandPacket(command));
|
||||
}
|
||||
|
||||
public void sendChatInstantly (String message) {
|
||||
if (!bot.loggedIn) return;
|
||||
|
||||
bot.session.send(new ServerboundChatPacket(
|
||||
message,
|
||||
Instant.now().toEpochMilli(),
|
||||
|
||||
Reference in New Issue
Block a user