mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-04 14:38:53 +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) {
|
private List<Warp> getItems(@NotNull CommandUser executor) {
|
||||||
List<Warp> warps = plugin.getDatabase().getWarps();
|
List<Warp> warps = plugin.getDatabase().getWarps();
|
||||||
if (plugin.getSettings().doPermissionRestrictWarps() && !executor.hasPermission(Warp.getWildcardPermission())) {
|
if (plugin.getSettings().doPermissionRestrictWarps() && !executor.hasPermission(Warp.getWildcardPermission())) {
|
||||||
warps = warps.stream()
|
warps = warps.stream().filter(warp -> executor.hasPermission(warp.getPermission())).toList();
|
||||||
.filter(warp -> executor.hasPermission(getPermission(warp.getPermission())))
|
|
||||||
.collect(Collectors.toList());
|
|
||||||
}
|
}
|
||||||
return warps;
|
return warps;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user