mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-24 06:06:45 +01:00
add access to player in McMMoPlayerNotificationEvent
This commit is contained in:
parent
24a57fab3d
commit
c4e4d31279
@ -26,9 +26,11 @@ public class McMMOPlayerNotificationEvent extends Event implements Cancellable {
|
|||||||
|
|
||||||
protected Component notificationTextComponent;
|
protected Component notificationTextComponent;
|
||||||
protected final NotificationType notificationType;
|
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);
|
super(false);
|
||||||
|
this.who = who;
|
||||||
this.notificationType = notificationType;
|
this.notificationType = notificationType;
|
||||||
this.notificationTextComponent = notificationTextComponent;
|
this.notificationTextComponent = notificationTextComponent;
|
||||||
this.chatMessageType = chatMessageType;
|
this.chatMessageType = chatMessageType;
|
||||||
@ -98,4 +100,8 @@ public class McMMOPlayerNotificationEvent extends Event implements Cancellable {
|
|||||||
public void setCancelled(boolean b) {
|
public void setCancelled(boolean b) {
|
||||||
isCancelled = b;
|
isCancelled = b;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Player getWho() {
|
||||||
|
return who;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user