mirror of
https://github.com/CarmJos/ScriptItems
synced 2024-09-19 13:25:50 +00:00
修改Item的读取方式
This commit is contained in:
parent
0ca5b23a7a
commit
abcee4212e
@ -48,8 +48,9 @@ public class ItemStackConfig {
|
||||
public static @Nullable ItemStackConfig read(@Nullable ConfigurationSection section) {
|
||||
if (section == null) return null;
|
||||
return new ItemStackConfig(
|
||||
Optional.ofNullable(section.getString("material")).map(Material::matchMaterial).orElse(null),
|
||||
section.getString("displayName"), section.getStringList("lore")
|
||||
Optional.ofNullable(section.getString("type")).map(Material::matchMaterial).orElse(null),
|
||||
section.getString("name"),
|
||||
section.getStringList("lore")
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user