Class NotificationHelper
java.lang.Object
com.datdeveloper.datmoddingapi.util.NotificationHelper
A class to simplify sending notifications to the player
- 
Method SummaryModifier and TypeMethodDescriptionstatic voidchatNotification(net.minecraft.server.level.ServerPlayer player, net.minecraft.network.chat.Component message) Display a notification for the given player in their chat
 This is just a wrapper aroundServerPlayer.sendSystemMessage(Component)static voidhotbarNotification(net.minecraft.server.level.ServerPlayer player, net.minecraft.network.chat.Component message) Display a notification for the given player just above their hotbarstatic voidtitleNotification(@NotNull net.minecraft.server.level.ServerPlayer player, @NotNull net.minecraft.network.chat.Component title, @Nullable net.minecraft.network.chat.Component subTitle, int fadeIn, int stay, int fadeOut) Display a notification for the given player in the middle of their screenstatic voidtitleNotification(net.minecraft.server.level.ServerPlayer player, net.minecraft.network.chat.Component title, @Nullable net.minecraft.network.chat.Component subTitle) Display a notification for the given player in the middle of their screen
 Uses 10, 40, 10 for fadeIn, stay, and fadeOut respectively
- 
Method Details- 
titleNotificationpublic static void titleNotification(@NotNull @NotNull net.minecraft.server.level.ServerPlayer player, @NotNull @NotNull net.minecraft.network.chat.Component title, @Nullable @Nullable net.minecraft.network.chat.Component subTitle, int fadeIn, int stay, int fadeOut) Display a notification for the given player in the middle of their screen- Parameters:
- player- The player to send the notification to
- title- The main title of the notification
- subTitle- The subtitle of the notification
- fadeIn- The number of ticks to spend fading the message in
- stay- The number of ticks for the message to spend on the screen
- fadeOut- The number of ticks to spend fading out
 
- 
titleNotificationpublic static void titleNotification(net.minecraft.server.level.ServerPlayer player, net.minecraft.network.chat.Component title, @Nullable @Nullable net.minecraft.network.chat.Component subTitle) Display a notification for the given player in the middle of their screen
 Uses 10, 40, 10 for fadeIn, stay, and fadeOut respectively- Parameters:
- player- The player to send the notification to
- title- The main title of the notification
- subTitle- The subtitle of the notification
 
- 
hotbarNotificationpublic static void hotbarNotification(net.minecraft.server.level.ServerPlayer player, net.minecraft.network.chat.Component message) Display a notification for the given player just above their hotbar- Parameters:
- player- The player to send the notification to
- message- The content of the notification
 
- 
chatNotificationpublic static void chatNotification(net.minecraft.server.level.ServerPlayer player, net.minecraft.network.chat.Component message) Display a notification for the given player in their chat
 This is just a wrapper aroundServerPlayer.sendSystemMessage(Component)- Parameters:
- player- The player to send the notification to
- message- The content of the notification
- See Also:
 
 
-