Update ItemConfig.java
This commit is contained in:
parent
0f12a477e0
commit
670bf1fd64
1 changed files with 6 additions and 6 deletions
|
@ -21,12 +21,6 @@ public class ItemConfig extends Config {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private ConfigKey createKey(Identifier item, String category) {
|
|
||||||
Identifier groupId = new Identifier(group, item.getNamespace());
|
|
||||||
Identifier categoryId = new Identifier(category, item.getPath());
|
|
||||||
return new ConfigKey(groupId, categoryId);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void registerEntries() {}
|
protected void registerEntries() {}
|
||||||
|
|
||||||
|
@ -36,6 +30,12 @@ public class ItemConfig extends Config {
|
||||||
this.writer.save();
|
this.writer.save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private ConfigKey createKey(Identifier item, String category) {
|
||||||
|
Identifier groupId = new Identifier(group, item.getNamespace());
|
||||||
|
Identifier categoryId = new Identifier(category, item.getPath());
|
||||||
|
return new ConfigKey(groupId, categoryId);
|
||||||
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public <E extends Entry<?>> E getEntry(Identifier item, String category) {
|
public <E extends Entry<?>> E getEntry(Identifier item, String category) {
|
||||||
return this.getEntry(createKey(item, category));
|
return this.getEntry(createKey(item, category));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue