Skip to content

Commit

Permalink
Get rid of PE warning filter
Browse files Browse the repository at this point in the history
  • Loading branch information
KaspianDev committed Dec 8, 2022
1 parent 5283864 commit 30bb94b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
10 changes: 1 addition & 9 deletions src/main/java/com/github/kaspiandev/antipopup/LogFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,6 @@ public Filter.Result filter(LogEvent event) {
return Filter.Result.DENY;

}
String packetEventError = "PacketEvents caught an unhandled "
+ "exception while calling your listener."
+ " java.lang.IndexOutOfBoundsException: index: 3,"
+ " length: 47 (expected: range(0, 3))";
if (config.getBoolean("suppress-pe-warnings", false)
&& event.getMessage().getFormattedMessage().contains(packetEventError)) {
return Filter.Result.DENY;
}
return Filter.Result.NEUTRAL;
}

Expand Down Expand Up @@ -146,4 +138,4 @@ public boolean isStopped() {
return false;
}

}
}
9 changes: 2 additions & 7 deletions src/main/resources/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
config-version: 22
config-version: 23

# Should we collect anonymous data about your server?
# false by default.
Expand All @@ -22,11 +22,6 @@ prevent-time-sync-kick: false
# Leave as true unless you have a different plugin stripping those.
strip-signature: true

# False by default, because really we
# shouldnt suppress any warnings, if you
# get annoyed however, turn this on (true).
suppress-pe-warnings: false

# We dont need that packet if
# we dont sign messages.
dont-send-header: true
Expand All @@ -41,4 +36,4 @@ enable-urls: false

# Do not touch ones below!
first-run: true
ask-bstats: true
ask-bstats: true

0 comments on commit 30bb94b

Please sign in to comment.