diff --git a/src/main/java/com/gmail/nossr50/events/skills/McMMOPlayerNotificationEvent.java b/src/main/java/com/gmail/nossr50/events/skills/McMMOPlayerNotificationEvent.java index 1b0c17949..0003642a1 100644 --- a/src/main/java/com/gmail/nossr50/events/skills/McMMOPlayerNotificationEvent.java +++ b/src/main/java/com/gmail/nossr50/events/skills/McMMOPlayerNotificationEvent.java @@ -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; + } }