mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-06 00:17:58 +01:00
Remove unnecessary scopes
This commit is contained in:
parent
79a4bd135a
commit
4b6026f18d
@ -420,27 +420,20 @@ public class Command {
|
|||||||
jsonObject.add(s, array);
|
jsonObject.add(s, array);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Names
|
// Names
|
||||||
{
|
|
||||||
processor.accept("names", array -> node.names.forEach(array::add));
|
processor.accept("names", array -> node.names.forEach(array::add));
|
||||||
}
|
|
||||||
// Nodes
|
// Nodes
|
||||||
{
|
|
||||||
processor.accept("nodes", array ->
|
processor.accept("nodes", array ->
|
||||||
node.nodes.forEach(n -> {
|
node.nodes.forEach(n -> {
|
||||||
JsonObject nodeObject = new JsonObject();
|
JsonObject nodeObject = new JsonObject();
|
||||||
processNode(n, nodeObject);
|
processNode(n, nodeObject);
|
||||||
array.add(nodeObject);
|
array.add(nodeObject);
|
||||||
}));
|
}));
|
||||||
}
|
|
||||||
// Arguments
|
// Arguments
|
||||||
{
|
|
||||||
processor.accept("arguments", array ->
|
processor.accept("arguments", array ->
|
||||||
node.arguments.forEach(arguments ->
|
node.arguments.forEach(arguments ->
|
||||||
array.add(String.join(StringUtils.SPACE, arguments))));
|
array.add(String.join(StringUtils.SPACE, arguments))));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private static final class Node {
|
private static final class Node {
|
||||||
private final Set<String> names = new HashSet<>();
|
private final Set<String> names = new HashSet<>();
|
||||||
|
Loading…
Reference in New Issue
Block a user