Bố Cục GUI
SmartSpawner cho phép tùy chỉnh hoàn toàn GUI spawner bằng các file trong plugins/SmartSpawner/gui_layouts/.
Cấu Trúc Thư Mục
plugins/SmartSpawner/gui_layouts/
├── default/
│ ├── main_gui.yml
│ ├── storage_gui.yml
│ └── sell_confirm_gui.yml
├── DonutSMP/
│ └── ...
└── DonutSMP_v2/
└── ...Chọn bố cục bằng gui_layout trong config.yml hoặc đổi trực tiếp với /ss gui_layout <name>.
Cooldown Nút
Mọi nút hỗ trợ cooldown tùy chọn riêng cho từng người chơi:
slot_12:
material: CHEST
enabled: true
cooldown: "2s"
click:
action: "open_storage"Giá trị dùng cùng định dạng thời gian với config.yml: 20, 5s, 10m, 1h, 1m_30s, v.v.
- Nút đang cooldown không chạy action và gửi thông báo
action_not_readyvới placeholder{time}. - Mọi nút action có debounce chống spam 300 ms ngay cả khi không đặt
cooldown. - Cooldown cũng có thể được ghi đè trong nhánh điều kiện
if:.
slot_14:
material: PLAYER_HEAD
enabled: true
if:
sell_integration:
cooldown: "3s"
click:
action: "sell_and_exp"
no_sell_integration:
click:
action: "open_stacker"Âm Thanh Khi Nhấn
Nút điều hướng dùng một sound khi chuyển trang thành công:
slot_1:
material: ARROW
enabled: true
click:
action: "previous_page"
sound: ui.button.clickNút action dùng âm thanh riêng khi thành công hoặc thất bại:
slot_6:
material: BUNDLE
enabled: true
click:
action: "take_all"
sound_success:
name: entity.item.pickup
volume: 1.0
pitch: 1.0
sound_fail: block.note_block.plingNhấp trái và phải có thể dùng action cùng âm thanh riêng:
left_click:
action: "sell_and_exp"
sound: ui.button.click
sound_success: block.note_block.bell
sound_fail: block.note_block.pling
right_click:
action: "open_stacker"
sound: ui.button.clickMỗi khóa âm thanh nhận một Bukkit key hoặc danh sách kèm volume và pitch:
sound_success:
- block.note_block.bell
- name: entity.experience_orb.pickup
volume: 0.8
pitch: 1.2Đặt khóa âm thanh thành none để tắt.
Texture Player Head Tùy Chỉnh
Nút dùng material: PLAYER_HEAD có thể hiển thị skin texture qua custom_texture:
slot_14:
material: PLAYER_HEAD
custom_texture: "df5de940bfe499c59ee8dac9f9c3919e7535eff3a9acb16f4842bf290f4c679f"
enabled: true
info_button: true
if:
sell_integration:
left_click:
action: "sell_and_exp"
right_click:
action: "open_stacker"
no_sell_integration:
click:
action: "open_stacker"custom_texturelà hash trong URL texture, không gồm tiền tốhttp://textures.minecraft.net/texture/.- Có thể tìm texture tại Minecraft-Heads.com.
- Nếu bỏ qua trên nút thông tin, plugin dùng head mob từ
spawners_settings.yml. - Texture được cache sau lần tải đầu, không ảnh hưởng hiệu năng khi mở GUI sau đó.
WARNING
custom_texture bị bỏ qua nếu material được ghi đè thành giá trị khác PLAYER_HEAD trong nhánh if:.
Ghi Đè Theo Điều Kiện
Dùng if: để đổi giao diện hoặc hành vi nút theo trạng thái máy chủ:
slot_14:
material: PLAYER_HEAD
custom_texture: "default_texture_hash_here"
enabled: true
info_button: true
if:
sell_integration:
material: EMERALD
left_click:
action: "sell_and_exp"
no_sell_integration:
click:
action: "open_stacker"Điều kiện hiện có gồm sell_integration và no_sell_integration.
