leejunyoung5819mc-paper-plugin-test-mcp-26.3

공개

마인크래프트 26.3 Paper 서버의 플러그인 테스트를 하려는 AI 에이전트를 위한 MCP 도구

20줄866 바이트
1package dev.mctester.bridge.mixin;
2
3import dev.mctester.bridge.QaBridgeClient;
4import net.minecraft.client.multiplayer.ServerData;
5import org.spongepowered.asm.mixin.Mixin;
6import org.spongepowered.asm.mixin.injection.At;
7import org.spongepowered.asm.mixin.injection.Inject;
8import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
9
10/**
11 * Optional: treat every server as "resource packs: enabled" so a server resource pack loads without the
12 * confirmation prompt (which would otherwise block automated joins).
13 */
14@Mixin(ServerData.class)
15public class ServerDataMixin {
16 @Inject(method = "getResourcePackStatus", at = @At("HEAD"), cancellable = true)
17 private void qa$acceptPacks(CallbackInfoReturnable<ServerData.ServerPackStatus> cir) {
18 if (QaBridgeClient.ACCEPT_SERVER_PACKS) cir.setReturnValue(ServerData.ServerPackStatus.ENABLED);
19 }
20}