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
Original file line number Diff line number Diff line change
Expand Up @@ -395,44 +395,49 @@ private ItemStack createEnhancedControlButton(Material material, String controlT

Map<String, String> placeholders = new HashMap<>();

// Get format strings from configuration
String selectedFormat = languageManager.getGuiItemName(controlType + ".selected_option");
String unselectedFormat = languageManager.getGuiItemName(controlType + ".unselected_option");

// Build available options list
StringBuilder availableOptions = new StringBuilder();
boolean first = true;

if (controlType.equals("filter")) {
FilterOption currentFilter = (FilterOption) currentOption;

// Set up color placeholders for all filter options
for (FilterOption option : FilterOption.values()) {
// Set active color for current option, white for others
String colorKey = option.getName() + "_color";
if (option == currentFilter) {
placeholders.put(colorKey, languageManager.getColorCode("filter." + option.getName() + ".color"));
} else {
placeholders.put(colorKey, "&f");
}
if (!first) availableOptions.append("\n");
String optionName = languageManager.getGuiItemName("filter." + option.getName());
String format = option == currentFilter ? selectedFormat : unselectedFormat;
String formattedOption = format.replace("%option_name%", optionName);
availableOptions.append(formattedOption);
first = false;
}

// Set button name
meta.setDisplayName(languageManager.getGuiItemName("filter.button.name"));

} else if (controlType.equals("sort")) {
SortOption currentSort = (SortOption) currentOption;

// Set up color placeholders for all sort options
for (SortOption option : SortOption.values()) {
// Set active color for current option, white for others
String colorKey = option.getName() + "_color";
if (option == currentSort) {
placeholders.put(colorKey, languageManager.getColorCode("sort." + option.getName() + ".color"));
} else {
placeholders.put(colorKey, "&f");
}
if (!first) availableOptions.append("\n");
String optionName = languageManager.getGuiItemName("sort." + option.getName());
String format = option == currentSort ? selectedFormat : unselectedFormat;
String formattedOption = format.replace("%option_name%", optionName);
availableOptions.append(formattedOption);
first = false;
}

// Set button name
meta.setDisplayName(languageManager.getGuiItemName("sort.button.name"));
}

placeholders.put("available_options", availableOptions.toString());

// Set the lore using the appropriate button lore path and the placeholders
String lorePath = controlType + ".button.lore";
meta.setLore(languageManager.getGuiItemLoreAsList(lorePath, placeholders));
List<String> lore = languageManager.getGuiItemLoreWithMultilinePlaceholders(lorePath, placeholders);
meta.setLore(lore);

button.setItemMeta(meta);
return button;
Expand Down
30 changes: 12 additions & 18 deletions core/src/main/resources/language/DonutSMP/gui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -233,33 +233,27 @@ filter:
button:
name: '&#00F986ꜰɪʟᴛᴇʀ sᴘᴀᴡɴᴇʀs'
lore:
- '%all_color%• ᴀʟʟ'
- '%active_color%• ᴀᴄᴛɪᴠᴇ'
- '%inactive_color%• ɪɴᴀᴄᴛɪᴠᴇ'
- '%available_options%'
- ''
- '&#00F986⊳ &#f8f8ffᴄʟɪᴄᴋ ᴛᴏ ꜰɪʟᴛᴇʀ'
all:
color: '&#00F986'
active:
color: '&a'
inactive:
color: '&#ff5252'
selected_option: '&#00F986• %option_name%'
unselected_option: '&#f8f8ff• %option_name%'
all: 'ᴀʟʟ'
active: 'ᴀᴄᴛɪᴠᴇ'
inactive: 'ɪɴᴀᴄᴛɪᴠᴇ'

sort:
button:
name: '&#00F986ꜱᴏʀᴛ ꜱᴘᴀᴡɴᴇʀꜱ'
lore:
- '%default_color%• ᴅᴇꜰᴀᴜʟᴛ (ɪᴅ)'
- '%stack_size_desc_color%• ꜱᴛᴀᴄᴋ ꜱɪᴢᴇ (↓)'
- '%stack_size_asc_color%• ꜱᴛᴀᴄᴋ ꜱɪᴢᴇ (↑)'
- '%available_options%'
- ''
- '&#00F986⊳ &#f8f8ffᴄʟɪᴄᴋ ᴛᴏ ꜱᴏʀᴛ'
default:
color: '&#00F986'
stack_size_asc:
color: '&#00F986'
stack_size_desc:
color: '&#00F986'
selected_option: '&#00F986• %option_name%'
unselected_option: '&#f8f8ff• %option_name%'
default: 'ᴅᴇꜰᴀᴜʟᴛ (ɪᴅ)'
stack_size_asc: 'ꜱᴛᴀᴄᴋ ꜱɪᴢᴇ (↑)'
stack_size_desc: 'ꜱᴛᴀᴄᴋ ꜱɪᴢᴇ (↓)'

spawner_item_list:
name: '&#3498dbꜱᴘᴀᴡɴᴇʀ #%id%'
Expand Down
30 changes: 12 additions & 18 deletions core/src/main/resources/language/de_DE/gui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -315,33 +315,27 @@ filter:
button:
name: '&#00F986ꜰɪʟᴛᴇʀ ꜱᴘᴀᴡɴᴇʀ'
lore:
- '%all_color%• ᴀʟʟᴇ'
- '%active_color%• ᴀᴋᴛɪᴠ'
- '%inactive_color%• ɪɴᴀᴋᴛɪᴠ'
- '%available_options%'
- ''
- '&#00F986⊳ &#f8f8ffᴋʟɪᴄᴋᴇɴ ᴢᴜᴍ ꜰɪʟᴛᴇʀɴ'
all:
color: '&#00F986'
active:
color: '&a'
inactive:
color: '&#ff5252'
selected_option: '&#00F986• %option_name%'
unselected_option: '&#f8f8ff• %option_name%'
all: 'ᴀʟʟᴇ'
active: 'ᴀᴋᴛɪᴠ'
inactive: 'ɪɴᴀᴋᴛɪᴠ'

sort:
button:
name: '&#00F986ꜱᴘᴀᴡɴᴇʀ ꜱᴏʀᴛɪᴇʀᴇɴ'
lore:
- '%default_color%• ꜱᴛᴀɴᴅᴀʀᴅ (ɪᴅ)'
- '%stack_size_desc_color%• ꜱᴛᴀᴄᴋ ɢʀᴏᴇꜱꜱᴇ (↓)'
- '%stack_size_asc_color%• ꜱᴛᴀᴄᴋ ɢʀᴏᴇꜱꜱᴇ (↑)'
- '%available_options%'
- ''
- '&#00F986⊳ &#f8f8ffᴋʟɪᴄᴋᴇɴ ᴢᴜᴍ ꜱᴏʀᴛɪᴇʀᴇɴ'
default:
color: '&#00F986'
stack_size_asc:
color: '&#00F986'
stack_size_desc:
color: '&#00F986'
selected_option: '&#00F986• %option_name%'
unselected_option: '&#f8f8ff• %option_name%'
default: 'ꜱᴛᴀɴᴅᴀʀᴅ (ɪᴅ)'
stack_size_asc: 'ꜱᴛᴀᴄᴋ ɢʀᴏᴇꜱꜱᴇ (↑)'
stack_size_desc: 'ꜱᴛᴀᴄᴋ ɢʀᴏᴇꜱꜱᴇ (↓)'

spawner_item_list:
name: '&#3498dbꜱᴘᴀᴡɴᴇʀ #%id%'
Expand Down
30 changes: 12 additions & 18 deletions core/src/main/resources/language/en_US/gui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -315,33 +315,27 @@ filter:
button:
name: '&#00F986ꜰɪʟᴛᴇʀ sᴘᴀᴡɴᴇʀs'
lore:
- '%all_color%• ᴀʟʟ'
- '%active_color%• ᴀᴄᴛɪᴠᴇ'
- '%inactive_color%• ɪɴᴀᴄᴛɪᴠᴇ'
- '%available_options%'
- ''
- '&#00F986⊳ &#f8f8ffᴄʟɪᴄᴋ ᴛᴏ ꜰɪʟᴛᴇʀ'
all:
color: '&#00F986'
active:
color: '&a'
inactive:
color: '&#ff5252'
selected_option: '&#00F986• %option_name%'
unselected_option: '&#f8f8ff• %option_name%'
all: 'ᴀʟʟ'
active: 'ᴀᴄᴛɪᴠᴇ'
inactive: 'ɪɴᴀᴄᴛɪᴠᴇ'

sort:
button:
name: '&#00F986ꜱᴏʀᴛ ꜱᴘᴀᴡɴᴇʀꜱ'
lore:
- '%default_color%• ᴅᴇꜰᴀᴜʟᴛ (ɪᴅ)'
- '%stack_size_desc_color%• ꜱᴛᴀᴄᴋ ꜱɪᴢᴇ (↓)'
- '%stack_size_asc_color%• ꜱᴛᴀᴄᴋ ꜱɪᴢᴇ (↑)'
- '%available_options%'
- ''
- '&#00F986⊳ &#f8f8ffᴄʟɪᴄᴋ ᴛᴏ ꜱᴏʀᴛ'
default:
color: '&#00F986'
stack_size_asc:
color: '&#00F986'
stack_size_desc:
color: '&#00F986'
selected_option: '&#00F986• %option_name%'
unselected_option: '&#f8f8ff• %option_name%'
default: 'ᴅᴇꜰᴀᴜʟᴛ (ɪᴅ)'
stack_size_asc: 'ꜱᴛᴀᴄᴋ ꜱɪᴢᴇ (↑)'
stack_size_desc: 'ꜱᴛᴀᴄᴋ ꜱɪᴢᴇ (↓)'

spawner_item_list:
name: '&#3498dbꜱᴘᴀᴡɴᴇʀ #%id%'
Expand Down
32 changes: 14 additions & 18 deletions core/src/main/resources/language/vi_VN/gui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -284,31 +284,27 @@ filter:
button:
name: '&#37eb9aʟọᴄ ꜱᴘᴀᴡɴᴇʀ'
lore:
- '%available_options%'
- ''
- '%all_color%• ᴛấᴛ ᴄả'
- '%active_color%• ʜᴏạᴛ độɴɢ'
- '%inactive_color%• ᴋʜôɴɢ ʜᴏạᴛ độɴɢ'
all:
color: '&#37eb9a'
active:
color: '&a'
inactive:
color: '&#ff5252'
- '&#37eb9a⊳ &#f8f8ffɴʜấᴘ để ʟọᴄ'
selected_option: '&#37eb9a• %option_name%'
unselected_option: '&#f8f8ff• %option_name%'
all: 'ᴛấᴛ ᴄả'
active: 'ʜᴏạᴛ độɴɢ'
inactive: 'ᴋʜôɴɢ ʜᴏạᴛ độɴɢ'

sort:
button:
name: '&#37eb9aꜱắᴘ xếᴘ ꜱᴘᴀᴡɴᴇʀ'
lore:
- '%available_options%'
- ''
- '%default_color%• ᴍặᴄ địɴʜ (ɪᴅ)'
- '%stack_size_asc_color%• ꜱᴛᴀᴄᴋ (↑)'
- '%stack_size_desc_color%• ꜱᴛᴀᴄᴋ (↓)'
default:
color: '&#37eb9a'
stack_size_asc:
color: '&#37eb9a'
stack_size_desc:
color: '&#37eb9a'
- '&#37eb9a⊳ &#f8f8ffɴʜấᴘ để ꜱắᴘ xếᴘ'
selected_option: '&#37eb9a• %option_name%'
unselected_option: '&#f8f8ff• %option_name%'
default: 'ᴍặᴄ địɴʜ (ɪᴅ)'
stack_size_asc: 'ꜱᴛᴀᴄᴋ (↑)'
stack_size_desc: 'ꜱᴛᴀᴄᴋ (↓)'

spawner_item_list:
name: '&#3498dbꜱᴘᴀᴡɴᴇʀ #%id%'
Expand Down