adjust origins to listen to config

This commit is contained in:
hyperdefined
2025-01-28 22:51:49 -05:00
parent 8a1759b6b1
commit 3e1c2dcbc3
9 changed files with 107 additions and 88 deletions

View File

@@ -88,6 +88,19 @@ public class ItemLore {
return itemLore;
}
/**
* Remove a given lore from an item.
*
* @param inputLore The item's lore.
* @param toRemove The line to remove.
* @return The lore with the line removed.
*/
public List<Component> removeLore(List<Component> inputLore, Component toRemove) {
List<Component> newLore = new ArrayList<>(inputLore);
newLore.removeIf(line -> PlainTextComponentSerializer.plainText().serialize(line).equals(PlainTextComponentSerializer.plainText().serialize(toRemove)));
return newLore;
}
/**
* Adds new ownership to an item.
*
@@ -977,17 +990,4 @@ public class ItemLore {
meta.lore(newLore);
return meta;
}
/**
* Remove a given lore from an item.
*
* @param inputLore The item's lore.
* @param toRemove The line to remove.
* @return The lore with the line removed.
*/
public List<Component> removeLore(List<Component> inputLore, Component toRemove) {
List<Component> newLore = new ArrayList<>(inputLore);
newLore.removeIf(line -> PlainTextComponentSerializer.plainText().serialize(line).equals(PlainTextComponentSerializer.plainText().serialize(toRemove)));
return newLore;
}
}