Skip to content

Commit

Permalink
feat(item): 为ItemConfig添加 ItemFlag 与 enchant 相关配置
Browse files Browse the repository at this point in the history
  • Loading branch information
CarmJos committed Jun 17, 2022
1 parent 2d8c181 commit 346ae4c
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,19 @@ public class ItemConfig {
protected @NotNull Map<Enchantment, Integer> enchants;
protected @NotNull Set<ItemFlag> flags;

public ItemConfig(@NotNull Material type, @Nullable String name) {
this(type, name, Collections.emptyList());
}

public ItemConfig(@NotNull Material type, @Nullable String name, @NotNull List<String> lore) {
this(type, (short) 0, name, lore);
}

public ItemConfig(@NotNull Material type, short damage,
@Nullable String name, @NotNull List<String> lore) {
this(type, damage, name, lore, Collections.emptyMap(), Collections.emptySet());
}

public ItemConfig(@NotNull Material type, short damage,
@Nullable String name, @NotNull List<String> lore,
@NotNull Map<Enchantment, Integer> enchants,
Expand Down

0 comments on commit 346ae4c

Please sign in to comment.