Skip to content

Commit

Permalink
[plugin] simplify ItemCreator#create
Browse files Browse the repository at this point in the history
  • Loading branch information
iGabyTM committed Jan 7, 2023
1 parent b0d12a7 commit da9e667
Showing 1 changed file with 1 addition and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -224,17 +224,7 @@ class ItemCreator(plugin: ArcaneVouchers) {

"model" -> value.toIntOrNull()?.let { builder.model(it) }

"color" -> {
if (!baseItem.hasItemMeta()) {
continue
}

val meta = baseItem.itemMeta ?: continue

if (meta is LeatherArmorMeta) {
meta.setColor(value.toColor())
}
}
"color" -> value.toColor()?.let { builder.color(it) }

"nbt" -> {
// Take everything that's after 'nbt:'
Expand Down

0 comments on commit da9e667

Please sign in to comment.