Skip to content

Commit

Permalink
Fix #1540.
Browse files Browse the repository at this point in the history
Signed-off-by: 秋雨落 <[email protected]>
  • Loading branch information
qyl27 committed Nov 8, 2024
1 parent 67d2744 commit a4fc8e0
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -259,4 +259,9 @@ public ConnectionProtocol getProtocol() {
public void sendPacket(Packet<?> packet) {
this.send(packet);
}

@Override
public void kickPlayer(Component component) {
disconnect(component);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import java.net.SocketAddress;

@Mixin(ServerConfigurationPacketListenerImpl.class)
public abstract class ServerConfigurationPacketListenerImplMixin extends ServerCommonPacketListenerImplMixin implements CraftPlayer.TransferCookieConnection {
public abstract class ServerConfigurationPacketListenerImplMixin extends ServerCommonPacketListenerImplMixin {

@Decorate(method = "startConfiguration", require = 0, at = @At(value = "INVOKE", target = "Lnet/minecraft/server/MinecraftServer;serverLinks()Lnet/minecraft/server/ServerLinks;"))
private ServerLinks arclight$sendLinksEvent(MinecraftServer instance) throws Throwable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
import java.util.logging.Level;

@Mixin(ServerGamePacketListenerImpl.class)
public abstract class ServerGamePacketListenerImplMixin extends ServerCommonPacketListenerImplMixin implements ServerPlayNetHandlerBridge, CraftPlayer.TransferCookieConnection {
public abstract class ServerGamePacketListenerImplMixin extends ServerCommonPacketListenerImplMixin implements ServerPlayNetHandlerBridge {

// @formatter:off
@Shadow public ServerPlayer player;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -377,4 +377,9 @@ public ConnectionProtocol getProtocol() {
public void sendPacket(Packet<?> packet) {
this.connection.send(packet);
}

@Override
public void kickPlayer(Component component) {
disconnect(component);
}
}

0 comments on commit a4fc8e0

Please sign in to comment.