mirror of
https://github.com/hyperdefined/ToolStats.git
synced 2026-01-28 08:25:58 +00:00
adjust origins to listen to config
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user