Skip to content

Commit

Permalink
fix: Fix cherry pick compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
BlayTheNinth committed Dec 9, 2023
1 parent c4bf5e4 commit 74677c9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import net.blay09.mods.balm.api.event.PlayerLoginEvent;
import net.minecraft.network.Connection;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.server.network.CommonListenerCookie;
import net.minecraft.server.players.PlayerList;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
Expand All @@ -14,7 +13,7 @@
@Mixin(PlayerList.class)
public class PlayerListMixin {
@Inject(method = "placeNewPlayer", at = @At(value = "RETURN"))
private void handlePlayerConnection(Connection connection, ServerPlayer player, CommonListenerCookie commonListenerCookie, CallbackInfo callbackInfo) {
private void handlePlayerConnection(Connection connection, ServerPlayer player, CallbackInfo callbackInfo) {
final PlayerLoginEvent event = new PlayerLoginEvent(player);
Balm.getEvents().fireEvent(event);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import net.blay09.mods.balm.api.event.PlayerConnectedEvent;
import net.minecraft.network.Connection;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.server.network.CommonListenerCookie;
import net.minecraft.server.players.PlayerList;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
Expand All @@ -14,7 +13,7 @@
@Mixin(PlayerList.class)
public class PlayerListMixin {
@Inject(method = "placeNewPlayer", at = @At(value = "INVOKE", target = "Lnet/minecraft/network/protocol/game/ClientboundPlayerAbilitiesPacket;<init>(Lnet/minecraft/world/entity/player/Abilities;)V"))
private void handlePlayerConnection(Connection connection, ServerPlayer player, CommonListenerCookie commonListenerCookie, CallbackInfo callbackInfo) {
private void handlePlayerConnection(Connection connection, ServerPlayer player, CallbackInfo callbackInfo) {
final PlayerConnectedEvent event = new PlayerConnectedEvent(player);
Balm.getEvents().fireEvent(event);
}
Expand Down

0 comments on commit 74677c9

Please sign in to comment.