Skip to content

Commit

Permalink
style: added TODO
Browse files Browse the repository at this point in the history
Currently, `noLevelOrIsland and hasCorrectIslandRank` require the sign to be on an island. Currently this means the flag/level requirement are non-existent in the case of a sign being placed on a non-BSB island. This gives a possible solution if new API comes to light.
  • Loading branch information
TreemanKing committed Jun 21, 2024
1 parent 1054518 commit 599a6e1
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,11 @@ public void onSignWarpCreate(SignChangeEvent e) {
if (noPerms(user, b.getWorld(), inWorld)) {
return;
}
// TODO: These checks are useless if the sign is placed outside a BSB world.
// This will mean level and rank requirements are nil in the case of allow-in-other-worlds: true.
// I'm not sure if there is a better way around this without adding new API checking for primary
// or last island accessed with relevant permissions.
// ignored.
if (inWorld && noLevelOrIsland(user, b.getWorld())) {
e.setLine(0, ChatColor.RED + addon.getSettings().getWelcomeLine());
return;
Expand Down

0 comments on commit 599a6e1

Please sign in to comment.