mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-19 19:25:48 +00:00
[CI skip] Formatting
This commit is contained in:
parent
71f3644078
commit
757d7613ac
@ -135,7 +135,7 @@ public final class Language {
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
protected FileConfiguration[] getFiles() {
|
||||
FileConfiguration[] getFiles() {
|
||||
return Arrays.stream(LanguageFile.valuesCached).map(this::getFile).toArray(FileConfiguration[]::new);
|
||||
}
|
||||
|
||||
|
@ -64,20 +64,23 @@ abstract class AbstractEnchantmentMachine extends AContainer {
|
||||
menu.replaceExistingItem(22, progressBar);
|
||||
}
|
||||
|
||||
protected boolean hasIgnoredLore(@Nonnull ItemStack itemStack) {
|
||||
if (useIgnoredLores.getValue() && itemStack.hasItemMeta()) {
|
||||
ItemMeta itemMeta = itemStack.getItemMeta();
|
||||
if (!itemMeta.hasLore()) {
|
||||
return false;
|
||||
}
|
||||
List<String> itemLore = itemMeta.getLore();
|
||||
List<String> ignoredLore = ignoredLores.getValue();
|
||||
for (String lore : ignoredLore) {
|
||||
if (itemLore.contains(ChatColors.color(lore))) {
|
||||
return true;
|
||||
protected boolean hasIgnoredLore(@Nonnull ItemStack item) {
|
||||
if (useIgnoredLores.getValue() && item.hasItemMeta()) {
|
||||
ItemMeta itemMeta = item.getItemMeta();
|
||||
|
||||
if (itemMeta.hasLore()) {
|
||||
List<String> itemLore = itemMeta.getLore();
|
||||
List<String> ignoredLore = ignoredLores.getValue();
|
||||
|
||||
// Check if any of the lines are found on the item
|
||||
for (String lore : ignoredLore) {
|
||||
if (itemLore.contains(ChatColors.color(lore))) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user