Removed <message_empty_...> user feedback on empty config message

This commit is contained in:
Jules 2024-04-06 21:48:29 -07:00
parent 8a8ec67f14
commit 3231a69bf3
2 changed files with 6 additions and 6 deletions

View File

@ -147,7 +147,7 @@
<dependency>
<groupId>fr.phoenixdevt</groupId>
<artifactId>Profile-API</artifactId>
<version>1.1-SNAPSHOT</version>
<version>1.1</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>

View File

@ -49,16 +49,16 @@ public class ConfigMessage {
}
/**
* Useful for things like indicators or specific lore lines which are
* string tags not requiring more than one string object. If the
* message is empty, an error string is returned. Either way,
* the returned value is non null for better user feedback.
* Useful for things like indicators or specific lore lines
* which are string tags not requiring more than one string
* object. An empty return value is accepted as some features
* do require the ability to fully remove text.
*
* @return First line of message, if it exists.
*/
@NotNull
public String asLine() {
return lines.isEmpty() ? "<message_empty_" + key + ">" : lines.get(0);
return lines.isEmpty() ? "" : lines.get(0);
}
@NotNull