Skip to content

Commit

Permalink
fix: Fixed wrong SyntaxCheck provider check
Browse files Browse the repository at this point in the history
  • Loading branch information
4drian3d committed May 12, 2023
1 parent 41b3715 commit 2b2827d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Expand Up @@ -80,8 +80,7 @@ private boolean checkIfCanCheck(final String command) {
})
.thenCompose(checkResult -> {
if (checkResult.isDenied()) {
final CheckResult.DeniedCheckresult deniedResult = (CheckResult.DeniedCheckresult) checkResult;
return CompletableFuture.completedFuture(CheckResult.denied(deniedResult.infractionType()));
return CompletableFuture.completedFuture(checkResult);
}

if (!checkIfCanCheck(event.getCommand())) {
Expand Down
Expand Up @@ -121,7 +121,7 @@ private CheckProvider<SyntaxCheck> syntax(ConfigurationContainer<Configuration>
return player -> {
final InfractionPlayerImpl infractionPlayer = (InfractionPlayerImpl) player;
final Configuration configuration = configurationContainer.get();
if (infractionPlayer.isAllowed(InfractionType.SPAM) && configuration.isEnabled(InfractionType.SPAM)) {
if (infractionPlayer.isAllowed(InfractionType.SYNTAX) && configuration.isEnabled(InfractionType.SYNTAX)) {
return SyntaxCheck.builder()
.allowedCommands(configuration.getSyntaxConfig().getAllowedCommands())
.build();
Expand Down

0 comments on commit 2b2827d

Please sign in to comment.