Skip to content

Commit

Permalink
修复无法传送到其他世界的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
glorydark committed Apr 5, 2024
1 parent 31ec254 commit f9dd270
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ public static boolean isWhiteListed(Player p, Level level) {
if (p == null) {
return false;
}
return new ArrayList<>(whitelists.getStringList(level.getName())).contains(p.getName());
List<String> list = new ArrayList<>(whitelists.getStringList(level.getName()));
return list.size() == 0 || list.contains(p.getName());
}

public enum OperatePermissionType{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,9 @@ public void EntityPortalEnterEvent(EntityPortalEnterEvent event) {
if (PermissionAPI.isOperator(p, p.getLevel())) {
return;
}
if (!bool) {
event.setCancelled(true);
}
} else {
if (!bool) {
event.setCancelled(true);
}
}
if (!bool) {
event.setCancelled(true);
}
}

Expand Down

0 comments on commit f9dd270

Please sign in to comment.