Launcher/LauncherAPI/src/main/java/pro/gravit/launcher/events/NotificationEvent.java
2023-12-23 12:05:23 +07:00

34 lines
876 B
Java

package pro.gravit.launcher.events;
import pro.gravit.launcher.core.LauncherNetworkAPI;
import pro.gravit.launcher.request.WebSocketEvent;
public class NotificationEvent implements WebSocketEvent {
@LauncherNetworkAPI
public final String head;
@LauncherNetworkAPI
public final String message;
@LauncherNetworkAPI
public final NotificationType icon;
public NotificationEvent(String head, String message) {
this.head = head;
this.message = message;
this.icon = NotificationType.INFO;
}
public NotificationEvent(String head, String message, NotificationType icon) {
this.head = head;
this.message = message;
this.icon = icon;
}
@Override
public String getType() {
return "notification";
}
public enum NotificationType {
INFO, WARN, ERROR, OTHER
}
}