Skip to content
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.

Commit

Permalink
Commands: remove useless check on OP
Browse files Browse the repository at this point in the history
  • Loading branch information
TheFaser committed Sep 17, 2023
1 parent 9388566 commit 53651c8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/java/net/flectone/commands/CommandHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public boolean onCommand(@NotNull CommandSender commandSender, @NotNull Command

Set<Player> playerSet = Bukkit.getOnlinePlayers()
.parallelStream()
.filter(player -> player.isOp() || player.hasPermission(permission))
.filter(player -> player.hasPermission(permission))
.collect(Collectors.toSet());

if (playerSet.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public boolean onCommand(@NotNull CommandSender commandSender, @NotNull Command
String kickedMessage = locale.getFormatString("command.maintenance.kicked-message", null);

playerSet.stream()
.filter(player -> !player.isOp() && !player.hasPermission(maintenancePermission) && player.isOnline())
.filter(player -> !player.hasPermission(maintenancePermission) && player.isOnline())
.forEach(player -> player.kickPlayer(kickedMessage));
}

Expand Down

0 comments on commit 53651c8

Please sign in to comment.