Skip to content

Conversation

@Remasuri
Copy link

I have noticed that the PlayerPreparesEnchant ScriptEvent errors in case of the minecraft provided offers having a null entry. I added some simple protections for null entries.

}
for (int i = 0; i < offers.size(); i++) {
MapTag map = MapTag.getMapFor(offers.getObject(i), getTagContext(path));
if(map.isEmpty()){
Copy link
Contributor

Choose a reason for hiding this comment

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

need space after if statement

}
for (int i = 0; i < offers.size(); i++) {
MapTag map = MapTag.getMapFor(offers.getObject(i), getTagContext(path));
if (map.isEmpty()){
Copy link
Member

Choose a reason for hiding this comment

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

Missing another space here - generally we recommend using an IDE like Intellji IDEA which can help with the formatting/do it for you, a lot easier than managing it manually.

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.

3 participants