Fix ignored events also getting whitelisted
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
36dd8afec1
commit
fea420f2bc
@ -35,7 +35,7 @@ public class SuperListener implements Listener
|
||||
|
||||
private final String[] dontLog = { "PlayerMoveEvent", "BlockFadeEvent", "BlockPhysicsEvent", "LeavesDecayEvent",
|
||||
"PlayerStatisticIncrementEvent", "PlayerRecipeDiscoverEvent", "PlayerArmSwingEvent", "BlockDropItemEvent",
|
||||
"BlockFertilizeEvent", "AsyncPlayerChatPreviewEvent", "InventoryOpenEvent", "ItemSpawnEvent"
|
||||
"BlockFertilizeEvent", "AsyncPlayerChatPreviewEvent", "ItemSpawnEvent", "InventoryOpenEvent", "BlockIgniteEvent"
|
||||
|
||||
};
|
||||
|
||||
@ -49,9 +49,6 @@ public class SuperListener implements Listener
|
||||
};
|
||||
|
||||
public void iGetCalledForEveryEvent(Event event) {
|
||||
if (Arrays.stream(dontLog).anyMatch(ignored -> event.getEventName().equals(ignored))) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(Arrays.stream(allowed).noneMatch(allowed -> event.getEventName().equals(allowed))) {
|
||||
if(event instanceof Cancellable)
|
||||
@ -60,6 +57,10 @@ public class SuperListener implements Listener
|
||||
}
|
||||
}
|
||||
|
||||
if (Arrays.stream(dontLog).anyMatch(ignored -> event.getEventName().equals(ignored))) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(event instanceof Cancellable)
|
||||
{
|
||||
if(Arrays.stream(allowed).noneMatch(allowed -> event.getEventName().equals(allowed))) {
|
||||
|
Loading…
Reference in New Issue
Block a user