mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 14:38:52 +00:00
Fix warp list permission check using wrong perm
This commit is contained in:
1 file changed
+1
-3
@@ -88,9 +88,7 @@ public class WarpListCommand extends ListCommand {
|
||||
private List<Warp> getItems(@NotNull CommandUser executor) {
|
||||
List<Warp> warps = plugin.getDatabase().getWarps();
|
||||
if (plugin.getSettings().doPermissionRestrictWarps() && !executor.hasPermission(Warp.getWildcardPermission())) {
|
||||
warps = warps.stream()
|
||||
.filter(warp -> executor.hasPermission(getPermission(warp.getPermission())))
|
||||
.collect(Collectors.toList());
|
||||
warps = warps.stream().filter(warp -> executor.hasPermission(warp.getPermission())).toList();
|
||||
}
|
||||
return warps;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user