Class NotificationManager
java.lang.Object
com.petarmc.petarlib.notification.NotificationManager
Utility class for showing in-game notifications to the player through the action bar.
Only works on the client side.
This class no longer relies on a global log prefix. Callers must supply a prefix
when showing notifications (e.g. "[MyMod]").
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidshowCustomChatNotif(String message) Shows a custom notification in chatstatic voidshowCustomNotification(String message) Shows a custom notification in the action bar.static voidShows an error notification in the action bar.static voidshowErrorInChat(String message, String prefix) Shows an error notification in chat.static voidShows an info notification in the action bar.static voidshowInfoInChat(String message, String prefix) Shows an info notification in chat.
-
Constructor Details
-
NotificationManager
public NotificationManager()
-
-
Method Details
-
showError
-
showInfo
-
showCustomNotification
Shows a custom notification in the action bar.- Parameters:
message- the message to show (supports color codes like "§a")
-
showInfoInChat
-
showErrorInChat
-
showCustomChatNotif
Shows a custom notification in chat- Parameters:
message- the message to show in chat (supports color codes)
-