Skip to content

Commit

Permalink
alert
Browse files Browse the repository at this point in the history
  • Loading branch information
Angeschossen committed Dec 28, 2023
1 parent fddbeb8 commit b42418c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ dependencies {
}

group = "com.github.angeschossen"
version = "6.42.13"
version = "6.42.14"
description = "LandsAPI"
java.sourceCompatibility = JavaVersion.VERSION_1_8

Expand Down
14 changes: 14 additions & 0 deletions src/main/java/me/angeschossen/lands/api/inbox/InboxMessage.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,41 +12,55 @@
public interface InboxMessage extends ExpressionEntity {
/**
* Get the category of this message.
*
* @return The category this message belongs to
*/
@NotNull
InboxCategory getCategory();

/**
* Get the message content {@link #getText()} with the messages date when it was received ({@link #getText()}).
*
* @param sender Used for per user language. If no player provided, uses default language.
* @return Format: time ({@link #getTime()}): content ({@link #getText()})
*/
@NotNull String getTextWithDate(@Nullable PlayerData sender);

/**
* Timestamp in milliseconds when the message was received.
*
* @return Milliseconds
*/
long getTime();

/**
* Get the message text
*
* @return Content of the message
*/
@NotNull
String getText();

/**
* Use {@link #getTextWithDate(PlayerData)} instead.
*
* @return Format: time ({@link #getTime()}): content ({@link #getText()})
*/
@Deprecated
@NotNull
String getTextWithDate();

/**
* Check if this message is an alert. Some messages are really important, such as the reminder to deposit money for upkeep, if a land
* is lacking funds.
*
* @return true, if this message is an alert
*/
boolean shouldAlertMembers();

/**
* Check if this message belongs to a specific inbox category.
*
* @param type The inbox category
* @return true, if the inbox category is the same or the provided inbox category equals {@link InboxCategory#ALL}
*/
Expand Down

0 comments on commit b42418c

Please sign in to comment.