public class Notify
extends java.lang.Object
Constructor and Description |
---|
Notify(java.lang.String message)
Create a new notify with message.
|
Notify(java.lang.String message,
int duration)
Create a new notify with a message and duration.
|
Modifier and Type | Method and Description |
---|---|
Color |
getBackgroundColor()
Get the current background color.
|
int |
getDuration()
Get the current duration.
|
java.lang.String |
getMessage()
Get the current message.
|
Color |
getSideBarColor()
Get the current sidebar color.
|
Color |
getTimebarColor()
Get the current timebar color.
|
boolean |
isColorCodesEnabled()
Gets whether or not text-embedded color codes are enabled.
|
boolean |
isSideBarEnabled()
Gets whether or not the sidebar is enabled.
|
void |
sendToAll(java.util.Collection<net.risingworld.api.objects.Player> playerList)
Send this notify to a group of users.
|
void |
sendToPlayer(net.risingworld.api.objects.Player player)
Send this notify to the given user.
|
void |
setBackgroundColor(Color bgColor)
Set the current background color.
|
void |
setColorCodesEnabled(boolean enabled)
Sets if text-embedded color codes are enabled.
|
void |
setDuration(int duration)
Set the current duration.
|
void |
setMessage(java.lang.String message)
Set the current message.
|
void |
setSideBarColor(Color sbColor)
Set the current sidebar color.
|
void |
setSideBarEnabled(boolean enabled)
Enable or disable the sidebar.
|
void |
setTimebarColor(Color tbColor)
Set the current timebar color.
|
public Notify(java.lang.String message)
message
- The message to the user (max. 20 characters).public Notify(java.lang.String message, int duration)
message
- The message to the user (max. 20 characters).duration
- The time how long the notification should be displayed in seconds (between 1-30).public Color getBackgroundColor()
public int getDuration()
public java.lang.String getMessage()
public Color getSideBarColor()
public Color getTimebarColor()
public boolean isColorCodesEnabled()
public boolean isSideBarEnabled()
public void sendToAll(java.util.Collection<net.risingworld.api.objects.Player> playerList)
playerList
- The users who should receive the notification.public void sendToPlayer(net.risingworld.api.objects.Player player)
player
- The user who should receive the notification.public void setBackgroundColor(Color bgColor)
bgColor
- The new Color.public void setColorCodesEnabled(boolean enabled)
enabled
- set - true to enable color codes, false to disable them.public void setDuration(int duration)
duration
- The time how long the notification should be displayed in seconds (between 1-30).public void setMessage(java.lang.String message)
message
- The new message (max. 20 characters).public void setSideBarColor(Color sbColor)
sbColor
- The new Color.public void setSideBarEnabled(boolean enabled)
enabled
- If true the sidebar is enabled.public void setTimebarColor(Color tbColor)
tbColor
- The new Color.