-
Couldn't load subscription status.
- Fork 21
Added 'haslore' and 'loreequalsmulti:<String>' modifiers #66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please keep the same format, as I will not be able to pull the request without it.
| } | ||
|
|
||
| public boolean hasLore() { | ||
| return this.lore != null && !this.lore.isEmpty(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the hasLore method for the item wrapper seems to be returning wrong information.
It returns true/false dependent on if the WRAPPER has lore and if it's not empty.
It should be returning true/false dependent on if haslore is in the placeholder or not, nothing to do with the wrapper.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact, this method could probably just be removed entirely.
| if (wrapper.shouldCheckHasLore()) { | ||
| data = multiMod ? data += "haslore:" : ""; | ||
| if (item.hasItemMeta()) { | ||
| data += item.getItemMeta().hasLore() ? "yes" : "no"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be using PlaceholderAPIPlugin boolean values PlaceholderAPIPlugin.booleanTrue() PlaceholderAPIPlugin.booleanFalse()
| } | ||
| if (wrapper.shouldCheckNameEquals()) | ||
| meta.setDisplayName(wrapper.getName()); | ||
| if (wrapper.shouldCheckLoreEquals() || wrapper.shouldCheckMultiLoreEquals() || wrapper.shouldCheckHasLore()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldCheckHasLore() should not be included here
No description provided.