leejunyoung5819mc-paper-plugin-test-mcp-26.3

공개

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

56줄2.5 KB
1# 데모 상점(fixtures/demo-shop) 회귀 테스트.
2# 실제 클라이언트로 NPC를 우클릭해 상자 GUI 상점을 열고, 정상 구매 + 악용 클릭(쉬프트/숫자키/더블클릭)을 시도한 뒤
3# 서버 쪽 진실(RCON)로 아이템과 에메랄드가 보존되는지 확인한다.
4name: 데모 상점 - 구매와 GUI 악용 방지
5setup:
6 - server_start: {}
7 - client_launch: {name: Bot1}
8 - rcon: demoshop bug off
9 - rcon: kill @e[type=minecraft:villager]
10 - rcon: clear Bot1
11 - rcon: give Bot1 emerald 12
12 - rcon: demoshop spawn 8.5 -60 11.5
13 - teleport: {client: Bot1, x: 8.5, y: -60, z: 9.0, yaw: 0, pitch: 0}
14
15steps:
16 - label: NPC 우클릭으로 상점 열기
17 interact_entity: {client: Bot1, name: 상점}
18 - wait_for: {client: Bot1, screen_title: 데모 상점}
19 - expect_screen: {client: Bot1, title: 데모 상점, has_item: {name: 다이아몬드, lore: "가격: 에메랄드 5개", slot: 11}}
20 - screenshot: {client: Bot1, label: shop-open}
21
22 - label: 정상 구매 (좌클릭)
23 click_item: {client: Bot1, name: 다이아몬드}
24 - expect_chat: {client: Bot1, chat: 구매 완료}
25 - expect_rcon: {command: demoshop balance Bot1, json: {emerald: 7, diamond: 1}}
26
27 - label: 쉬프트 클릭으로 진열품 빼내기 시도
28 click_item: {client: Bot1, name: 다이아몬드, area: container, mode: QUICK_MOVE}
29 - sleep: 300
30 - expect_rcon: {command: demoshop balance Bot1, json: {emerald: 7, diamond: 1}}
31 - expect_screen: {client: Bot1, has_item: {name: 다이아몬드, slot: 11}, carried: null}
32
33 - label: 숫자키(SWAP)로 진열품과 핫바 교체 시도
34 click_slot: {client: Bot1, slot: 11, mode: SWAP, button: 8}
35 - sleep: 300
36 - expect_rcon: {command: demoshop balance Bot1, json: {emerald: 7, diamond: 1}}
37 - expect_screen: {client: Bot1, has_item: {name: 다이아몬드, slot: 11}}
38
39 - label: 우클릭(PICKUP button 1)으로 집기 시도
40 click_slot: {client: Bot1, slot: 11, mode: PICKUP, button: 1}
41 - sleep: 300
42 - expect_screen: {client: Bot1, carried: null}
43
44 - label: 두 번째 구매 후 잔액 부족
45 click_item: {client: Bot1, name: 다이아몬드}
46 - expect_chat: {client: Bot1, chat: 구매 완료}
47 - click_item: {client: Bot1, name: 다이아몬드}
48 - expect_chat: {client: Bot1, chat: 부족}
49 - expect_rcon: {command: demoshop balance Bot1, json: {emerald: 2, diamond: 2}}
50 - screenshot: {client: Bot1, label: after-purchases}
51
52 - label: 서버 로그에 예외 없음
53 expect_no_server_errors: {}
54
55teardown:
56 - close_screen: {client: Bot1}