1
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:
TheBusyBiscuit 2021-04-26 18:06:25 +02:00
parent 71f3644078
commit 757d7613ac
2 changed files with 15 additions and 12 deletions

View File

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

View File

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