Update ItemConfig.java

This commit is contained in:
Aleksey 2020-11-28 15:46:56 +03:00
parent 0f12a477e0
commit 670bf1fd64

View file

@ -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
protected void registerEntries() {}
@ -36,6 +30,12 @@ public class ItemConfig extends Config {
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
public <E extends Entry<?>> E getEntry(Identifier item, String category) {
return this.getEntry(createKey(item, category));