SteamWar/SpigotCore
Archiviert
13
0

Merge pull request 'Remove Rank checks' (#255) from fixRank into master
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Reviewed-on: #255
Reviewed-by: YoyoNow <jwsteam@nidido.de>
Reviewed-by: Chaoscaot <chaoscaot@zohomail.eu>
Dieser Commit ist enthalten in:
Lixfel 2024-01-19 19:55:32 +01:00
Commit 375fbf1463

Datei anzeigen

@ -456,7 +456,7 @@ public class SchematicSelector {
nodes.removeIf(node -> !node.isDir()); nodes.removeIf(node -> !node.isDir());
} }
if(target.target == Target.SCHEMATIC_TYPE) { if(target.target == Target.SCHEMATIC_TYPE) {
nodes.removeIf(node -> node.isDir() || !node.getSchemtype().equals(target.type) || node.getRank() > target.rank); nodes.removeIf(node -> node.isDir() || !node.getSchemtype().equals(target.type));
} }
return nodes; return nodes;
} }
@ -470,14 +470,6 @@ public class SchematicSelector {
break; break;
case SCHEMATIC_TYPE: case SCHEMATIC_TYPE:
nodes.addAll(SchematicNode.accessibleByUserTypeParent(user, target.type, parent==null?null:parent.getId())); nodes.addAll(SchematicNode.accessibleByUserTypeParent(user, target.type, parent==null?null:parent.getId()));
if(target.rank >= 0) {
nodes.removeIf(node -> {
if(node.isDir()) {
return false;
}
return node.getRank() > target.rank;
});
}
break; break;
default: default:
nodes.addAll(SchematicNode.list(user, parent == null?null:parent.getId())); nodes.addAll(SchematicNode.list(user, parent == null?null:parent.getId()));
@ -518,6 +510,7 @@ public class SchematicSelector {
private final Target target; private final Target target;
private final SchematicType type; private final SchematicType type;
@Deprecated
private final int rank; private final int rank;
} }