mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 07:06:45 +01:00
PlayerNotification now marked async
This commit is contained in:
parent
432a4aa330
commit
0adaa0ba66
@ -9,6 +9,7 @@ Key:
|
|||||||
|
|
||||||
Version 2.1.48
|
Version 2.1.48
|
||||||
1.14 Support
|
1.14 Support
|
||||||
|
(API) Player notification events are now marked async
|
||||||
|
|
||||||
Version 2.1.47
|
Version 2.1.47
|
||||||
Fix NPE when party leader is offline and players grab a party list
|
Fix NPE when party leader is offline and players grab a party list
|
||||||
|
@ -5,13 +5,14 @@ import net.md_5.bungee.api.ChatMessageType;
|
|||||||
import net.md_5.bungee.api.chat.TextComponent;
|
import net.md_5.bungee.api.chat.TextComponent;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.Cancellable;
|
import org.bukkit.event.Cancellable;
|
||||||
|
import org.bukkit.event.Event;
|
||||||
import org.bukkit.event.HandlerList;
|
import org.bukkit.event.HandlerList;
|
||||||
import org.bukkit.event.player.PlayerEvent;
|
import org.bukkit.event.player.PlayerEvent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This event is sent for when mcMMO informs a player about various important information
|
* This event is sent for when mcMMO informs a player about various important information
|
||||||
*/
|
*/
|
||||||
public class McMMOPlayerNotificationEvent extends PlayerEvent implements Cancellable {
|
public class McMMOPlayerNotificationEvent extends Event implements Cancellable {
|
||||||
private boolean isCancelled;
|
private boolean isCancelled;
|
||||||
/*
|
/*
|
||||||
* Messages can be sent to both places, as configured in advanced.yml
|
* Messages can be sent to both places, as configured in advanced.yml
|
||||||
@ -27,7 +28,7 @@ public class McMMOPlayerNotificationEvent extends PlayerEvent implements Cancell
|
|||||||
protected final NotificationType notificationType;
|
protected final NotificationType notificationType;
|
||||||
|
|
||||||
public McMMOPlayerNotificationEvent(Player who, NotificationType notificationType, TextComponent notificationTextComponent, ChatMessageType chatMessageType, boolean isMessageAlsoBeingSentToChat) {
|
public McMMOPlayerNotificationEvent(Player who, NotificationType notificationType, TextComponent notificationTextComponent, ChatMessageType chatMessageType, boolean isMessageAlsoBeingSentToChat) {
|
||||||
super(who);
|
super(true);
|
||||||
this.notificationType = notificationType;
|
this.notificationType = notificationType;
|
||||||
this.notificationTextComponent = notificationTextComponent;
|
this.notificationTextComponent = notificationTextComponent;
|
||||||
this.chatMessageType = chatMessageType;
|
this.chatMessageType = chatMessageType;
|
||||||
|
Loading…
Reference in New Issue
Block a user