Skip to content

Commit

Permalink
Merge pull request #136 from TreemanKing/fix-other-worlds
Browse files Browse the repository at this point in the history
fix (partial): other worlds can be used
  • Loading branch information
tastybento authored Jun 21, 2024
2 parents 0a12a26 + 599a6e1 commit 7f9f352
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,17 @@ 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;
}

if(!hasCorrectIslandRank(b, user)) {
if (inWorld && !hasCorrectIslandRank(b, user)) {
e.setLine(0, ChatColor.RED + addon.getSettings().getWelcomeLine());
user.sendMessage("warps.error.not-correct-rank");
return;
Expand Down

0 comments on commit 7f9f352

Please sign in to comment.