i forgor
This commit is contained in:
@@ -183,7 +183,7 @@ public class ChatPlugin extends Bot.Listener {
|
||||
if (splitMessage.trim().equals("")) continue;
|
||||
|
||||
if (splitMessage.startsWith("/")) {
|
||||
bot.sendPacket(new ServerboundChatCommandPacket(
|
||||
bot.session().send(new ServerboundChatCommandPacket(
|
||||
splitMessage.substring(1),
|
||||
Instant.now().toEpochMilli(),
|
||||
0L,
|
||||
@@ -192,7 +192,7 @@ public class ChatPlugin extends Bot.Listener {
|
||||
new BitSet()
|
||||
));
|
||||
} else {
|
||||
bot.sendPacket(new ServerboundChatPacket(
|
||||
bot.session().send(new ServerboundChatPacket(
|
||||
splitMessage,
|
||||
Instant.now().toEpochMilli(),
|
||||
0L,
|
||||
|
||||
@@ -86,7 +86,7 @@ public class CorePlugin extends PositionPlugin.PositionListener {
|
||||
if (!ready) return;
|
||||
|
||||
if (bot.options().useCore()) {
|
||||
bot.sendPacket(new ServerboundSetCommandBlockPacket(
|
||||
bot.session().send(new ServerboundSetCommandBlockPacket(
|
||||
absoluteCorePosition(),
|
||||
command,
|
||||
kaboom ? CommandBlockMode.AUTO : CommandBlockMode.REDSTONE,
|
||||
@@ -112,7 +112,7 @@ public class CorePlugin extends PositionPlugin.PositionListener {
|
||||
final CompletableFuture<CompoundTag> future = new CompletableFuture<>();
|
||||
transactions.put(transactionId, future);
|
||||
|
||||
final Runnable afterTick = () -> bot.sendPacket(new ServerboundBlockEntityTagQuery(transactionId, position));
|
||||
final Runnable afterTick = () -> bot.session().send(new ServerboundBlockEntityTagQuery(transactionId, position));
|
||||
|
||||
bot.executor().schedule(afterTick, 50, TimeUnit.MILLISECONDS);
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ public class PositionPlugin extends Bot.Listener {
|
||||
}
|
||||
|
||||
public void packetReceived (ClientboundPlayerPositionPacket packet) {
|
||||
bot.sendPacket(new ServerboundAcceptTeleportationPacket(packet.getTeleportId()));
|
||||
bot.session().send(new ServerboundAcceptTeleportationPacket(packet.getTeleportId()));
|
||||
|
||||
position = Vector3i.from(packet.getX(), packet.getY(), packet.getZ());
|
||||
for (PositionListener listener : listeners) { listener.positionChange(position); }
|
||||
|
||||
@@ -157,7 +157,7 @@ public class SelfCarePlugin extends Bot.Listener {
|
||||
final GameEventValue value = packet.getValue();
|
||||
|
||||
if (notification == GameEvent.ENTER_CREDITS) {
|
||||
bot.sendPacket(new ServerboundClientCommandPacket(ClientCommand.RESPAWN));
|
||||
bot.session().send(new ServerboundClientCommandPacket(ClientCommand.RESPAWN));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ public class TabCompletePlugin extends Bot.Listener {
|
||||
public CompletableFuture<ClientboundCommandSuggestionsPacket> tabComplete (String command) {
|
||||
final int transactionId = nextTransactionId++;
|
||||
|
||||
bot.sendPacket(new ServerboundCommandSuggestionPacket(transactionId, command));
|
||||
bot.session().send(new ServerboundCommandSuggestionPacket(transactionId, command));
|
||||
|
||||
final CompletableFuture<ClientboundCommandSuggestionsPacket> future = new CompletableFuture<>();
|
||||
transactions.put(transactionId, future);
|
||||
|
||||
Reference in New Issue
Block a user