leejunyoung5819mc-paper-plugin-test-mcp-26.3

공개

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

18줄759 바이트
1package dev.mctester.bridge.mixin;
2
3import dev.mctester.bridge.QaBridgeClient;
4import net.minecraft.client.gui.components.toasts.Toast;
5import net.minecraft.client.gui.components.toasts.ToastManager;
6import org.spongepowered.asm.mixin.Mixin;
7import org.spongepowered.asm.mixin.injection.At;
8import org.spongepowered.asm.mixin.injection.Inject;
9import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
10
11/** Optional: drop toasts (recipe unlocked, insecure chat warning...) so they don't cover screenshots. */
12@Mixin(ToastManager.class)
13public class ToastManagerMixin {
14 @Inject(method = "addToast", at = @At("HEAD"), cancellable = true)
15 private void qa$hideToasts(Toast toast, CallbackInfo ci) {
16 if (QaBridgeClient.HIDE_TOASTS) ci.cancel();
17 }
18}