leejunyoung5819 mc-paper-plugin-test-mcp-26.3
공개마인크래프트 26.3 Paper 서버의 플러그인 테스트를 하려는 AI 에이전트를 위한 MCP 도구
| 1 | package dev.mctester.bridge.mixin; |
| 2 | |
| 3 | import dev.mctester.bridge.QaBridgeClient; |
| 4 | import net.minecraft.client.gui.components.toasts.Toast; |
| 5 | import net.minecraft.client.gui.components.toasts.ToastManager; |
| 6 | import org.spongepowered.asm.mixin.Mixin; |
| 7 | import org.spongepowered.asm.mixin.injection.At; |
| 8 | import org.spongepowered.asm.mixin.injection.Inject; |
| 9 | import 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) |
| 13 | public 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 | } |