add access to player in McMMoPlayerNotificationEvent

This commit is contained in:
JL-III 2023-09-01 14:38:12 -05:00
parent 24a57fab3d
commit c4e4d31279

View File

@ -26,9 +26,11 @@ public class McMMOPlayerNotificationEvent extends Event implements Cancellable {
protected Component notificationTextComponent;
protected final NotificationType notificationType;
private final Player who;
public McMMOPlayerNotificationEvent(Player who, NotificationType notificationType, Component notificationTextComponent, McMMOMessageType chatMessageType, boolean isMessageAlsoBeingSentToChat) {
public McMMOPlayerNotificationEvent(@NotNull Player who, NotificationType notificationType, Component notificationTextComponent, McMMOMessageType chatMessageType, boolean isMessageAlsoBeingSentToChat) {
super(false);
this.who = who;
this.notificationType = notificationType;
this.notificationTextComponent = notificationTextComponent;
this.chatMessageType = chatMessageType;
@ -98,4 +100,8 @@ public class McMMOPlayerNotificationEvent extends Event implements Cancellable {
public void setCancelled(boolean b) {
isCancelled = b;
}
public Player getWho() {
return who;
}
}