[Suggestion] Lore Filter
jackwright-ual opened this issue ยท 4 comments
Problem with that is lore is a client side thing, and the search logic runs on the server (which can't know what language the client player is using). I agree it would be useful, but not sure it's practical...
Problem with that is lore is a client side thing, and the search logic runs on the server (which can't know what language the client player is using). I agree it would be useful, but not sure it's practical...
Quick reply - thanks, you could possibly use the lore translate key
There's no such thing as a "lore translate key". Any lore (i.e. tooltips) that are added to an item are done client-side by mods. The only translation key is for the item's display name.
Created my own filter named "NBT Regex Filter"
@Override
public boolean matchItem(ItemStack stack, Filter.Flags flags) {
if (stack.isEmpty()) return false;
//check tag exists
if(stack.getTag() == null) {
return false;
}
for (Pattern pat : patterns) {
String nbtData = stack.getTag().getString();
if (pat.matcher(nbtData).find()) {
return true;
}
}
return false;
}