mirror of
https://github.com/dmulloy2/ProtocolLib.git
synced 2024-11-27 21:26:17 +01:00
Increase the player listener to MONITOR.
This commit is contained in:
parent
6053b9e64b
commit
eb328c41e8
@ -475,18 +475,17 @@ public final class PacketFilterManager implements ProtocolManager, ListenerInvok
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
manager.registerEvents(new Listener() {
|
manager.registerEvents(new Listener() {
|
||||||
|
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
|
||||||
public void onPlayerJoin(PlayerJoinEvent event) {
|
public void onPlayerJoin(PlayerJoinEvent event) {
|
||||||
playerInjection.injectPlayer(event.getPlayer());
|
playerInjection.injectPlayer(event.getPlayer());
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||||
public void onPlayerQuit(PlayerQuitEvent event) {
|
public void onPlayerQuit(PlayerQuitEvent event) {
|
||||||
playerInjection.uninjectPlayer(event.getPlayer());
|
playerInjection.uninjectPlayer(event.getPlayer());
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||||
public void onPluginDisabled(PluginDisableEvent event) {
|
public void onPluginDisabled(PluginDisableEvent event) {
|
||||||
// Clean up in case the plugin forgets
|
// Clean up in case the plugin forgets
|
||||||
if (event.getPlugin() != plugin) {
|
if (event.getPlugin() != plugin) {
|
||||||
@ -522,7 +521,7 @@ public final class PacketFilterManager implements ProtocolManager, ListenerInvok
|
|||||||
Class eventPriority = loader.loadClass("org.bukkit.event.Event$Priority");
|
Class eventPriority = loader.loadClass("org.bukkit.event.Event$Priority");
|
||||||
|
|
||||||
// Get the priority
|
// Get the priority
|
||||||
Object priorityNormal = Enum.valueOf(eventPriority, "Highest");
|
Object priorityNormal = Enum.valueOf(eventPriority, "Monitor");
|
||||||
|
|
||||||
// Get event types
|
// Get event types
|
||||||
Object playerJoinType = Enum.valueOf(eventTypes, "PLAYER_JOIN");
|
Object playerJoinType = Enum.valueOf(eventTypes, "PLAYER_JOIN");
|
||||||
|
Loading…
Reference in New Issue
Block a user