Skip to content

Rework item aliases#38

Open
BlaneyXYZ wants to merge 4 commits intomasterfrom
item-aliases
Open

Rework item aliases#38
BlaneyXYZ wants to merge 4 commits intomasterfrom
item-aliases

Conversation

@BlaneyXYZ
Copy link
Copy Markdown
Member

Made item aliases an optional feature, item aliases can now be set in item_aliases.csv when required. Also makes the default kit valid now (excluding an issue with damage values).

Copy link
Copy Markdown
Member

@WizardCM WizardCM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once changes are made, please squash commits and keep the commit title short, with any elaboration in the description.

*/
package org.royaldev.royalcommands;

import org.apache.commons.lang3.ArrayUtils;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these imports needed?

for (final ConfigurationNode item : items) {
final ItemStack is = this.getItemStack(item);
if (is == null) continue;
if (is == null) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I agree this change is probably something we want to move towards, this shouldn't be done as part of this PR and should be part of a bigger code cleanup commit that can then be ignored using Git's ignore refs.

Comment on lines +73 to 74
final Damageable imd = (Damageable) is.getItemMeta();
imd.setDamage(item.getShort("damage", (short) 0));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two lines could probably be removed, as it's just setting damage to 0, which is the default, and then never actually updating the is meta.

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