Skip to content

Easier path system to skip section chaining. #3

Open
@Manered

Description

@Manered

Let's say we have something like this:

items:
  item_name:
    slot: 10
    item:
      enchantments: []

To access the last scalar node enchantments, we would need to do:

root.section("items", items -> items.section("item_name", itemName -> itemName.section("item", item -> {
  /* Finally here. */
})));

The easier way to skip all of the unused sections will be:

root.section("items.item_name.item", section -> {
  /* finally here */
});

But we can also just do:

root.getList("items.item_name.item.enchantments", String.class);

The behaviour should be recursively creating previous nodes.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions