Skip to content

Conversation

@TomTeDev
Copy link

@TomTeDev TomTeDev commented Feb 8, 2024

No description provided.

Copy link
Contributor

@cj89898 cj89898 left a 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();
Copy link
Contributor

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.

Copy link
Contributor

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";
Copy link
Contributor

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()) {
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants