mirror of
https://github.com/JonasunderscoreJones/YetAnotherDiscordChatLink.git
synced 2025-10-23 16:49:18 +02:00
Port to 1.19.x
This commit is contained in:
parent
48761085c4
commit
53349761a8
3 changed files with 6 additions and 7 deletions
|
@ -3,7 +3,6 @@ package dev.jonasjones.yadcl.mixin;
|
|||
import dev.jonasjones.yadcl.config.ModConfigs;
|
||||
import net.minecraft.network.ClientConnection;
|
||||
import net.minecraft.server.PlayerManager;
|
||||
import net.minecraft.server.network.ConnectedClientData;
|
||||
import net.minecraft.server.network.ServerPlayerEntity;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
|
@ -16,7 +15,7 @@ import static dev.jonasjones.yadcl.dcbot.DiscordBot.sendToDiscord;
|
|||
@Mixin(PlayerManager.class)
|
||||
public class PlayerManagerMixin {
|
||||
@Inject(at = @At("HEAD"), method = "onPlayerConnect")
|
||||
public void onPlayerConnect(ClientConnection connection, ServerPlayerEntity player, ConnectedClientData clientData, CallbackInfo ci) {
|
||||
public void onPlayerConnect(ClientConnection connection, ServerPlayerEntity player, CallbackInfo ci) {
|
||||
if (ModConfigs.PLAYER_JOIN_LEAVE_MSG) {
|
||||
sendToDiscord(player.getDisplayName().getString() + " joined the game");
|
||||
/*if (ModConfigs.BOT_STATUS.equals("PlayerCount")) {
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.14.22",
|
||||
"minecraft": "~1.20.2",
|
||||
"minecraft": ">=1.17",
|
||||
"java": ">=17",
|
||||
"fabric-api": "*"
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue