Add option to hide warps from the warp list if you do not have permission to use it, Closes #27

This commit is contained in:
William278 committed 2021-04-16 14:58:38 +01:00
1 parent e5d265a155
commit 8d527033f6
3 files changed
+10

No files matched your search

@@ -188,6 +188,9 @@ public class ListHandler {
for (int i = warpsLowerBound; i < warpsUpperBound; i++) {
try {
Warp warp = warps.get(i);
if (HuskHomes.getSettings().doHideRestrictedWarps()) { // Don't show inaccessible warps if hiding restricted warps is on.
if (!Warp.getWarpCanUse(player, warp.getName())) { continue; }
}
if (i != warpsLowerBound) {
warpList.append(divider(), ComponentBuilder.FormatRetention.NONE);
}