Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions core/src/main/java/github/nighter/smartspawner/SmartSpawner.java
Original file line number Diff line number Diff line change
Expand Up @@ -433,4 +433,16 @@ public void debug(String message) {
public SpawnerMenuFormUI getSpawnerMenuFormUI() {
return spawnerMenuFormUI;
}

public SpawnerMenuAction getSpawnerMenuAction() {
return spawnerMenuAction;
}

public SpawnerStackerUI getSpawnerStackerUI() {
return spawnerStackerUI;
}

public SpawnerSellManager getSpawnerSellManager() {
return spawnerSellManager;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,18 @@ private boolean handleLayoutAction(Player player, SpawnerData spawner, int slot,
handleExpBottleClick(player, spawner, true);
handleSellAllItems(player, spawner);
return true;
case "sell_all":
if (isClickTooFrequent(player)) {
return true;
}
// Check permissions for selling
if (!plugin.hasSellIntegration() || !player.hasPermission("smartspawner.sellall")) {
messageService.sendMessage(player, "no_permission");
return true;
}
// Sell all items only (no XP collection)
handleSellAllItems(player, spawner);
return true;
case "collect_exp":
handleExpBottleClick(player, spawner, false);
return true;
Expand Down

Large diffs are not rendered by default.

17 changes: 15 additions & 2 deletions core/src/main/resources/gui_layouts/DonutSMP/main_gui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ buttons:
condition: "shop_integration"
actions:
left_click: "sell_inventory" # Collect EXP and sell items in storage
right_click: "sell_inventory" # Open stacker GUI
right_click: "open_stacker" # Open stacker GUI

# Spawner information display without shop integration
# Without shop integration: Both clicks open stacker GUI
Expand All @@ -32,6 +32,9 @@ buttons:
material: PLAYER_HEAD
enabled: true
condition: "no_shop_integration"
actions:
left_click: "open_stacker" # Open stacker GUI
right_click: "open_stacker" # Open stacker GUI

# Experience collection button
exp:
Expand All @@ -40,4 +43,14 @@ buttons:
enabled: true
actions:
left_click: "collect_exp"
right_click: "collect_exp"
right_click: "collect_exp"

# Sell all items button (only items, no experience)
sell_all:
slot: 10
material: GOLD_INGOT
enabled: true
condition: "shop_integration"
actions:
left_click: "sell_all"
right_click: "sell_all"
12 changes: 11 additions & 1 deletion core/src/main/resources/gui_layouts/default/main_gui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,14 @@ buttons:
enabled: true
actions:
left_click: "collect_exp"
right_click: "collect_exp"
right_click: "collect_exp"

# Sell all items button (only items, no experience)
sell_all:
slot: 10
material: GOLD_INGOT
enabled: true
condition: "shop_integration"
actions:
left_click: "sell_all"
right_click: "sell_all"
52 changes: 39 additions & 13 deletions core/src/main/resources/language/DonutSMP/gui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,29 +33,55 @@ bedrock_gui:
# Button text configuration for Bedrock forms
buttons:
# Storage button - opens spawner loot storage
storage: '&#F97603Open Storage'
storage: 'Open Storage'

# Info/Stack button - opens spawner stacking menu
stack_info: '&#FCE300Open Stack Menu'
stack_info: 'Open Stack Menu'

# Experience button - collects stored experience
experience: '&#FCE300Collect Experience'
experience: 'Collect Experience'

# Sell inventory button - collects XP and sells all items
sell_inventory: 'Claim XP & Sell All'

# Sell all button - sells all items only
sell_all: 'Sell All Items'

# Status text for storage and experience displays
status:
storage:
empty: '&#aEmpty'
plenty_space: '&#aPlenty of Space'
half_full: '&#eHalf Full'
filling_up: '&#F97603Filling Up'
nearly_full: '&#cNearly Full'
empty: 'Empty'
plenty_space: 'Plenty of Space'
half_full: 'Half Full'
filling_up: 'Filling Up'
nearly_full: 'Nearly Full'

experience:
empty: '&#aEmpty'
small_amount: '&#aSmall Amount'
medium_amount: '&#FCE300Medium Amount'
large_amount: '&#F97603Large Amount'
almost_full: '&#cAlmost Full'
empty: 'Empty'
small_amount: 'Small Amount'
medium_amount: 'Medium Amount'
large_amount: 'Large Amount'
almost_full: 'Almost Full'

# Configurable spawner info content for Bedrock forms (displayed at bottom)
info_content:
header: 'INFORMATION:'
sections:
spawner_info:
- 'Stack: %stack_size%'
- 'Range: %range% blocks'
- 'Mobs: %min_mobs% - %max_mobs%'
- 'Delay: %delay%s'
- ''
storage_info:
- 'STORAGE:'
- 'Slots: %current_items%/%max_items%'
- 'Status: %storage_status%'
- ''
experience_info:
- 'EXPERIENCE:'
- 'Current: %current_exp%/%max_exp% XP'
- 'Status: %exp_status%'

spawner_storage_item:
name: '&#F97603sᴘᴀᴡɴᴇʀ sᴛᴏʀᴀɢᴇ'
Expand Down
54 changes: 41 additions & 13 deletions core/src/main/resources/language/en_US/gui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,29 +33,57 @@ bedrock_gui:
# Button text configuration for Bedrock forms
buttons:
# Storage button - opens spawner loot storage
storage: '&#fce96aOpen Storage'
storage: 'Open Storage'

# Info/Stack button - opens spawner stacking menu
stack_info: '&#ab7afdOpen Stack Menu'
stack_info: 'Open Stack Menu'

# Experience button - collects stored experience
experience: '&#37eb9aCollect Experience'
experience: 'Collect Experience'

# Sell inventory button - collects XP and sells all items
sell_inventory: 'Claim XP & Sell All'

# Sell all button - sells all items only
sell_all: 'Sell All Items'

# Status text for storage and experience displays
status:
storage:
empty: '&#aEmpty'
plenty_space: '&#aPlenty of Space'
half_full: '&#eHalf Full'
filling_up: '&#6Filling Up'
nearly_full: '&#cNearly Full'
empty: 'Empty'
plenty_space: 'Plenty of Space'
half_full: 'Half Full'
filling_up: 'Filling Up'
nearly_full: 'Nearly Full'

experience:
empty: '&#aEmpty'
small_amount: '&#aSmall Amount'
medium_amount: '&#eMedium Amount'
large_amount: '&#6Large Amount'
almost_full: '&#cAlmost Full'
empty: 'Empty'
small_amount: 'Small Amount'
medium_amount: 'Medium Amount'
large_amount: 'Large Amount'
almost_full: 'Almost Full'

# Configurable spawner info content for Bedrock forms (displayed at bottom)
# Available placeholders: %entity%, %ᴇɴᴛɪᴛʏ%, %stack_size%, %range%, %min_mobs%, %max_mobs%, %delay%,
# %current_items%, %max_items%, %formatted_storage%, %current_exp%, %max_exp%, %formatted_exp%
info_content:
header: 'INFORMATION:'
sections:
spawner_info:
- 'Stack: %stack_size%'
- 'Range: %range% blocks'
- 'Mobs: %min_mobs% - %max_mobs%'
- 'Delay: %delay%s'
- ''
storage_info:
- 'STORAGE:'
- 'Slots: %current_items%/%max_items%'
- 'Status: %storage_status%'
- ''
experience_info:
- 'EXPERIENCE:'
- 'Current: %current_exp%/%max_exp% XP'
- 'Status: %exp_status%'

# Spawner Storage Item Configuration

Expand Down
52 changes: 39 additions & 13 deletions core/src/main/resources/language/vi_VN/gui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,29 +33,55 @@ bedrock_gui:
# Button text configuration for Bedrock forms
buttons:
# Storage button - opens spawner loot storage
storage: '&#fce96aᴍở ᴋʜᴏ ᴄʜứᴀ'
storage: 'Mở Kho Chứa'

# Info/Stack button - opens spawner stacking menu
stack_info: '&#ab7afdᴍở ᴍᴇɴᴜ xếᴘ ᴄʜồɴɢ'
stack_info: 'Mở Menu Xếp Chồng'

# Experience button - collects stored experience
experience: '&#37eb9aThu thập ᴋɪɴʜ ɴɢʜɪệᴍ'
experience: 'Thu Thập Kinh Nghiệm'

# Sell inventory button - collects XP and sells all items
sell_inventory: 'Nhận XP & Bán Tất Cả'

# Sell all button - sells all items only
sell_all: 'Bán Tất Cả Vật Phẩm'

# Status text for storage and experience displays
status:
storage:
empty: '&#aTrống'
plenty_space: '&#aCòn ɴʜɪềᴜ ᴄʜỗ'
half_full: '&#eNửᴀ đầʏ'
filling_up: '&#6Đang đầʏ dần'
nearly_full: '&#cGầɴ đầʏ'
empty: 'Trống'
plenty_space: 'Còn nhiều chỗ'
half_full: 'Nửa đầy'
filling_up: 'Đang đầy dần'
nearly_full: 'Gần đầy'

experience:
empty: '&#aTrống'
small_amount: '&#aSố ʟượɴɢ ɪ́ᴛ'
medium_amount: '&#eSố ʟượɴɢ ᴛrung bình'
large_amount: '&#6Số ʟượɴɢ ʟớɴ'
almost_full: '&#cGầɴ đầʏ'
empty: 'Trống'
small_amount: 'Số lượng ít'
medium_amount: 'Số lượng trung bình'
large_amount: 'Số lượng lớn'
almost_full: 'Gần đầy'

# Configurable spawner info content for Bedrock forms (displayed at bottom)
info_content:
header: 'THÔNG TIN:'
sections:
spawner_info:
- 'Chồng: %stack_size%'
- 'Phạm vi: %range% khối'
- 'Quái vật: %min_mobs% - %max_mobs%'
- 'Độ trễ: %delay%s'
- ''
storage_info:
- 'KHO CHỨA:'
- 'Ô: %current_items%/%max_items%'
- 'Trạng thái: %storage_status%'
- ''
experience_info:
- 'KINH NGHIỆM:'
- 'Hiện tại: %current_exp%/%max_exp% XP'
- 'Trạng thái: %exp_status%'

spawner_storage_item:
name: '&#fce96aᴋʜᴏ ᴄʜứᴀ'
Expand Down