- Improved the info menus again.

This commit is contained in:
GB6 2019-04-05 16:00:10 +02:00
parent 19caa00bc5
commit a40b001ed0
11 changed files with 24 additions and 12 deletions

View File

@ -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"))

View File

@ -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;
}

View File

@ -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;

View File

@ -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"))

View File

@ -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

View File

@ -8,6 +8,7 @@ slots: "ALL_SLOTS"
group: ELITE
enchant-item:
description-color: "&f"
material: "PAPER"
display-name: "{group_color}{enchant}"
lore:

View File

@ -8,6 +8,7 @@ slots: "ALL_SLOTS"
group: LEGENDARY
enchant-item:
description-color: "&f"
material: "PAPER"
display-name: "{group_color}{enchant}"
lore:

View File

@ -8,6 +8,7 @@ slots: "ALL_SLOTS"
group: SIMPLE
enchant-item:
description-color: "&f"
material: "PAPER"
display-name: "{group_color}{enchant}"
lore:

View File

@ -8,6 +8,7 @@ slots: "ALL_SLOTS"
group: ULTIMATE
enchant-item:
description-color: "&f"
material: "PAPER"
display-name: "{group_color}{enchant}"
lore:

View File

@ -8,6 +8,7 @@ slots: "ALL_SLOTS"
group: UNIQUE
enchant-item:
description-color: "&f"
material: "PAPER"
display-name: "{group_color}{enchant}"
lore:

View File

@ -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