mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2025-01-02 22:07:50 +01:00
Some events still can not be cancelled at all.
This commit is contained in:
parent
e73620e5c2
commit
b2f513b1ad
@ -121,22 +121,19 @@ public class NCPExemptionManager {
|
|||||||
public static Listener getListener() {
|
public static Listener getListener() {
|
||||||
return new Listener() {
|
return new Listener() {
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
@EventHandler(
|
@EventHandler(priority = EventPriority.LOWEST)
|
||||||
ignoreCancelled = true, priority = EventPriority.LOWEST)
|
|
||||||
public void onPlayerJoin(final PlayerJoinEvent event) {
|
public void onPlayerJoin(final PlayerJoinEvent event) {
|
||||||
NCPExemptionManager.registerPlayer(event.getPlayer());
|
NCPExemptionManager.registerPlayer(event.getPlayer());
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
@EventHandler(
|
@EventHandler(priority = EventPriority.MONITOR)
|
||||||
ignoreCancelled = true, priority = EventPriority.MONITOR)
|
|
||||||
public void onPlayerQuit(final PlayerQuitEvent event) {
|
public void onPlayerQuit(final PlayerQuitEvent event) {
|
||||||
NCPExemptionManager.tryToRemove(event.getPlayer());
|
NCPExemptionManager.tryToRemove(event.getPlayer());
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
@EventHandler(
|
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||||
ignoreCancelled = true, priority = EventPriority.MONITOR)
|
|
||||||
public void onPlayerKick(final PlayerKickEvent event) {
|
public void onPlayerKick(final PlayerKickEvent event) {
|
||||||
NCPExemptionManager.tryToRemove(event.getPlayer());
|
NCPExemptionManager.tryToRemove(event.getPlayer());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user