Skip to content

Commit

Permalink
Ensure players pass all join checks before adding them to list of Que…
Browse files Browse the repository at this point in the history
…ry IPs
  • Loading branch information
adryd325 committed Aug 24, 2024
1 parent a0c9aab commit 416c18d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id 'fabric-loom' version '1.2-SNAPSHOT'
id 'org.ajoberstar.grgit' version '4.1.0'
id 'org.ajoberstar.grgit' version '4.1.1'
id 'maven-publish'
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ class MixinServerLoginNetworkHandler {

@Inject(method = "tickVerify", at = @At(value = "INVOKE", target = "Lnet/minecraft/server/PlayerManager;checkCanJoin(Ljava/net/SocketAddress;Lcom/mojang/authlib/GameProfile;)Lnet/minecraft/text/Text;", shift = At.Shift.AFTER))
private void atSuccessfulJoin(CallbackInfo ci) {
IPList.INSTANCE.addToIPList(this.connection.getAddress());
if (this.server.getPlayerManager().checkCanJoin(this.connection.getAddress(), this.profile) == null) {
IPList.INSTANCE.addToIPList(this.connection.getAddress());
}
}

@Inject(method = "onDisconnected", at = @At("HEAD"), cancellable = true)
Expand Down

0 comments on commit 416c18d

Please sign in to comment.