-
-
Notifications
You must be signed in to change notification settings - Fork 373
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
Apply new line (%nr%
) in item lore correctly
#3636
Apply new line (%nr%
) in item lore correctly
#3636
Conversation
%nr%
) in item lore correctly
@@ -62,10 +64,13 @@ public boolean init(Expression<?>[] exprs, int matchedPattern, Kleenean kleenean | |||
|
|||
@Override | |||
protected ItemType[] get(Event e, ItemType[] source) { | |||
String[] lore = this.lore.getArray(e); | |||
List<String> lore = Arrays.stream(this.lore.getArray(e)) |
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.
stream looks nice, but you should be able to replace the Arrays#stream call with this.lore.stream(e)
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.
Thanks. I didn't know about such a nice method!
The base branch was changed.
Description
Apply new line (
%nr%
) in item lore. It seems that #2505 forgot this.e.g.
1 of stone with lore "first line%nl%second line"
The test case describes the behavior well.
Target Minecraft Versions: any
Requirements: none
Related Issues: #3544.