2022-04-23 06:08:31 +00:00
|
|
|
package emu.grasscutter.server.event.game;
|
|
|
|
|
2022-04-27 04:21:57 +00:00
|
|
|
import emu.grasscutter.net.packet.BasePacket;
|
2022-04-23 06:08:31 +00:00
|
|
|
import emu.grasscutter.server.event.Cancellable;
|
2022-04-29 02:13:19 +00:00
|
|
|
import emu.grasscutter.server.event.types.ServerEvent;
|
2022-04-23 06:08:31 +00:00
|
|
|
import emu.grasscutter.server.game.GameSession;
|
|
|
|
|
|
|
|
public final class SendPacketEvent extends ServerEvent implements Cancellable {
|
|
|
|
private final GameSession gameSession;
|
2022-04-27 04:21:57 +00:00
|
|
|
private BasePacket packet;
|
2022-04-23 06:08:31 +00:00
|
|
|
|
2022-04-27 04:21:57 +00:00
|
|
|
public SendPacketEvent(GameSession gameSession, BasePacket packet) {
|
2022-04-23 06:08:31 +00:00
|
|
|
super(Type.GAME);
|
|
|
|
|
|
|
|
this.gameSession = gameSession;
|
|
|
|
this.packet = packet;
|
|
|
|
}
|
|
|
|
|
|
|
|
public GameSession getGameSession() {
|
|
|
|
return this.gameSession;
|
|
|
|
}
|
|
|
|
|
2022-04-27 04:21:57 +00:00
|
|
|
public void setPacket(BasePacket packet) {
|
2022-04-23 06:08:31 +00:00
|
|
|
this.packet = packet;
|
|
|
|
}
|
|
|
|
|
2022-04-27 04:21:57 +00:00
|
|
|
public BasePacket getPacket() {
|
2022-04-23 06:08:31 +00:00
|
|
|
return this.packet;
|
|
|
|
}
|
|
|
|
}
|