Package com.petarmc.lib.notification
Class NotificationManager
java.lang.Object
com.petarmc.lib.notification.NotificationManager
Utility class for showing in-game notifications to the player.
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 TypeMethodDescriptionprivate static voidshowChatMessage(String msg) static voidshowCustom(String message, String colorCode, String prefix) Shows a custom notification in chat.static voidShows an error notification in chat.static voidShows an info notification in chat.
-
Constructor Details
-
NotificationManager
public NotificationManager()
-
-
Method Details
-
showChatMessage
-
showError
Shows an error notification in chat.- Parameters:
prefix- the prefix to show (e.g. "[MyMod]") - may be empty
-
showInfo
Shows an info notification in chat.- Parameters:
prefix- the prefix to show (e.g. "[MyMod]") - can be empty
-
showCustom
Shows a custom notification in chat.- Parameters:
message- the message to showcolorCode- the color code prefix like "§a"prefix- the prefix to show (e.g. "[MyMod]") - may be empty
-