Skip to content

Commit

Permalink
feat: Add Message#getMessageLines(char) which EpicAutomators needs
Browse files Browse the repository at this point in the history
EpicAutomators just needs the method. It never existed in the core,
it has been used in the plugin since for ever essentially...
Somebody just never comitted it and published local builds I guess...

I'm annoyed
  • Loading branch information
SpraxDev committed Oct 2, 2024
1 parent 8799a6f commit f7c9dfe
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Core/src/main/java/com/craftaro/core/locale/Message.java
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,11 @@ public Component getMessage() {
* @return the message
*/
public List<Component> getMessageLines() {
//return Arrays.asList(ChatColor.translateAlternateColorCodes('&', this.message.toText()).split("[\n|]"));
return AdventureUtils.splitComponent(this.message, '\n');
return getMessageLines('\n');
}

public List<Component> getMessageLines(char splitChar) {
return AdventureUtils.splitComponent(this.message, splitChar);
}

/**
Expand Down

0 comments on commit f7c9dfe

Please sign in to comment.