refactor: rename command output packet to message packet
This commit is contained in:
@@ -1 +1 @@
|
||||
2513
|
||||
2514
|
||||
@@ -5,15 +5,15 @@ import me.chayapak1.chomens_bot.chomeNSMod.Packet;
|
||||
import me.chayapak1.chomens_bot.chomeNSMod.Types;
|
||||
import net.kyori.adventure.text.Component;
|
||||
|
||||
public class ClientboundCommandOutputPacket implements Packet {
|
||||
public final Component output;
|
||||
public class ClientboundMessagePacket implements Packet {
|
||||
public final Component message;
|
||||
|
||||
public ClientboundCommandOutputPacket (Component output) {
|
||||
this.output = output;
|
||||
public ClientboundMessagePacket (Component message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public ClientboundCommandOutputPacket (ByteBuf buf) {
|
||||
this.output = Types.readComponent(buf);
|
||||
public ClientboundMessagePacket (ByteBuf buf) {
|
||||
this.message = Types.readComponent(buf);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -23,6 +23,6 @@ public class ClientboundCommandOutputPacket implements Packet {
|
||||
|
||||
@Override
|
||||
public void serialize (ByteBuf buf) {
|
||||
Types.writeComponent(buf, this.output);
|
||||
Types.writeComponent(buf, this.message);
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
package me.chayapak1.chomens_bot.command.contexts;
|
||||
|
||||
import me.chayapak1.chomens_bot.Bot;
|
||||
import me.chayapak1.chomens_bot.chomeNSMod.clientboundPackets.ClientboundCommandOutputPacket;
|
||||
import me.chayapak1.chomens_bot.chomeNSMod.clientboundPackets.ClientboundMessagePacket;
|
||||
import me.chayapak1.chomens_bot.command.CommandContext;
|
||||
import me.chayapak1.chomens_bot.data.player.PlayerEntry;
|
||||
import net.kyori.adventure.text.Component;
|
||||
@@ -20,7 +20,7 @@ public class ChomeNSModCommandContext extends CommandContext {
|
||||
public void sendOutput (Component component) {
|
||||
bot.chomeNSMod.send(
|
||||
sender,
|
||||
new ClientboundCommandOutputPacket(component)
|
||||
new ClientboundMessagePacket(component)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user