mirror of
https://github.com/songoda/EpicEnchants.git
synced 2024-12-22 17:18:41 +01:00
- Improved the info menus again.
This commit is contained in:
parent
19caa00bc5
commit
a40b001ed0
@ -47,7 +47,7 @@ public class InfoMenu extends FastInv {
|
||||
of("max_level", enchant.getMaxLevel()),
|
||||
of("applicable_to", whitelist),
|
||||
of("enchant", enchant.getIdentifier()),
|
||||
of("description", enchant.getDescription())).build());
|
||||
of("description", enchant.getDescription().stream().map(s -> config.getString("enchant-item.description-color") + s).collect(Collectors.toList()))).build());
|
||||
});
|
||||
|
||||
if (config.isConfigurationSection("contents"))
|
||||
|
@ -50,7 +50,7 @@ public class BookItem {
|
||||
|
||||
if (string.contains("{description}")) {
|
||||
toSet.remove(i);
|
||||
toSet.addAll(i, enchant.getDescription().stream().map(GeneralUtils::color).collect(Collectors.toList()));
|
||||
toSet.addAll(i, enchant.getDescription().stream().map(s -> enchant.getGroup().getDescriptionColor() + s).map(GeneralUtils::color).collect(Collectors.toList()));
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -10,6 +10,7 @@ public class Group {
|
||||
private String name;
|
||||
private String format;
|
||||
private String color;
|
||||
private String descriptionColor;
|
||||
private int slotsUsed;
|
||||
private BookItem bookItem;
|
||||
private int destroyRateMin, destroyRateMax, successRateMin, successRateMax;
|
||||
|
@ -85,6 +85,7 @@ public class ConfigParser {
|
||||
.name(color(section.getString("group-name")))
|
||||
.format(section.getString("group-lore-format"))
|
||||
.color(section.getString("group-color"))
|
||||
.descriptionColor(section.getString("description-color"))
|
||||
.bookItem(parseBookItem(instance, section.getConfigurationSection("book-item")))
|
||||
.slotsUsed(section.getInt("slots-used"))
|
||||
.tinkererExp(section.getInt("tinkerer-exp-per-level"))
|
||||
|
@ -1,9 +1,10 @@
|
||||
groups:
|
||||
SIMPLE:
|
||||
order: 0
|
||||
group-color: "&f"
|
||||
group-color: "&7&l&n"
|
||||
group-name: "Simple"
|
||||
group-lore-format: "{group_color}{enchant} {level}"
|
||||
description-color: "&e"
|
||||
rates:
|
||||
destroy-min: 10
|
||||
destroy-max: 100
|
||||
@ -20,9 +21,10 @@ groups:
|
||||
- "&7Drag and drop to enchant."
|
||||
UNIQUE:
|
||||
order: 1
|
||||
group-color: "&a"
|
||||
group-color: "&a&l&n"
|
||||
group-name: "Unique"
|
||||
group-lore-format: "{group_color}{enchant} {level}"
|
||||
description-color: "&e"
|
||||
rates:
|
||||
destroy-min: 10
|
||||
destroy-max: 100
|
||||
@ -39,9 +41,10 @@ groups:
|
||||
- "&7Drag and drop to enchant."
|
||||
ELITE:
|
||||
order: 2
|
||||
group-color: "&b"
|
||||
group-color: "&b&l&n"
|
||||
group-name: "Elite"
|
||||
group-lore-format: "{group_color}{enchant} {level}"
|
||||
description-color: "&e"
|
||||
rates:
|
||||
destroy-min: 10
|
||||
destroy-max: 100
|
||||
@ -58,9 +61,10 @@ groups:
|
||||
- "&7Drag and drop to enchant."
|
||||
ULTIMATE:
|
||||
order: 3
|
||||
group-color: "&e"
|
||||
group-color: "&e&l&n"
|
||||
group-name: "Ultimate"
|
||||
group-lore-format: "{group_color}{enchant} {level}"
|
||||
description-color: "&e"
|
||||
rates:
|
||||
destroy-min: 10
|
||||
destroy-max: 100
|
||||
@ -77,9 +81,10 @@ groups:
|
||||
- "&7Drag and drop to enchant."
|
||||
LEGENDARY:
|
||||
order: 4
|
||||
group-color: "&6"
|
||||
group-color: "&6&l&n"
|
||||
group-name: "Legendary"
|
||||
group-lore-format: "{group_color}{enchant} {level}"
|
||||
description-color: "&e"
|
||||
rates:
|
||||
destroy-min: 10
|
||||
destroy-max: 100
|
||||
|
@ -8,6 +8,7 @@ slots: "ALL_SLOTS"
|
||||
group: ELITE
|
||||
|
||||
enchant-item:
|
||||
description-color: "&f"
|
||||
material: "PAPER"
|
||||
display-name: "{group_color}{enchant}"
|
||||
lore:
|
||||
|
@ -8,6 +8,7 @@ slots: "ALL_SLOTS"
|
||||
group: LEGENDARY
|
||||
|
||||
enchant-item:
|
||||
description-color: "&f"
|
||||
material: "PAPER"
|
||||
display-name: "{group_color}{enchant}"
|
||||
lore:
|
||||
|
@ -8,6 +8,7 @@ slots: "ALL_SLOTS"
|
||||
group: SIMPLE
|
||||
|
||||
enchant-item:
|
||||
description-color: "&f"
|
||||
material: "PAPER"
|
||||
display-name: "{group_color}{enchant}"
|
||||
lore:
|
||||
|
@ -8,6 +8,7 @@ slots: "ALL_SLOTS"
|
||||
group: ULTIMATE
|
||||
|
||||
enchant-item:
|
||||
description-color: "&f"
|
||||
material: "PAPER"
|
||||
display-name: "{group_color}{enchant}"
|
||||
lore:
|
||||
|
@ -8,6 +8,7 @@ slots: "ALL_SLOTS"
|
||||
group: UNIQUE
|
||||
|
||||
enchant-item:
|
||||
description-color: "&f"
|
||||
material: "PAPER"
|
||||
display-name: "{group_color}{enchant}"
|
||||
lore:
|
||||
|
@ -6,24 +6,24 @@ contents:
|
||||
material: "PAPER"
|
||||
display-name: "&f&lSimple Enchantments"
|
||||
group: SIMPLE
|
||||
slot: 0
|
||||
slot: 2
|
||||
2:
|
||||
material: "PAPER"
|
||||
display-name: "&a&lUnique Enchantments"
|
||||
group: UNIQUE
|
||||
slot: 1
|
||||
slot: 3
|
||||
3:
|
||||
material: "PAPER"
|
||||
display-name: "&b&lElite Enchantments"
|
||||
group: ELITE
|
||||
slot: 2
|
||||
slot: 4
|
||||
4:
|
||||
material: "PAPER"
|
||||
display-name: "&e&lUltimate Enchantments"
|
||||
group: ULTIMATE
|
||||
slot: 3
|
||||
slot: 5
|
||||
5:
|
||||
material: "PAPER"
|
||||
display-name: "&6&lLegendary Enchantments"
|
||||
group: LEGENDARY
|
||||
slot: 4
|
||||
slot: 6
|
||||
|
Loading…
Reference in New Issue
Block a user