mirror of
https://github.com/BentoBoxWorld/Warps.git
synced 2024-11-22 02:25:31 +01:00
Merge pull request #136 from TreemanKing/fix-other-worlds
fix (partial): other worlds can be used
This commit is contained in:
commit
7f9f35253d
@ -158,12 +158,17 @@ public class WarpSignsListener implements Listener {
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user