Fix unbreakable only being set in certain cases
This commit is contained in:
parent
ca2b28e267
commit
bdb005a3c8
@ -290,7 +290,7 @@ public class ArmoredElytraBuilder
|
||||
* Whether the output armored elytra should be unbreakable. This defaults to {@link ConfigLoader#unbreakable()}
|
||||
* when not overridden.
|
||||
*/
|
||||
private boolean isUnbreakable;
|
||||
private @Nullable Boolean isUnbreakable = null;
|
||||
|
||||
private Builder(NBTEditor nbtEditor, DurabilityManager durabilityManager,
|
||||
ConfigLoader config, ArmoredElytra plugin)
|
||||
@ -309,6 +309,8 @@ public class ArmoredElytraBuilder
|
||||
name = name == null ? plugin.getArmoredElytraName(newArmorTier) : name;
|
||||
lore = lore == null ? plugin.getElytraLore(newArmorTier) : lore;
|
||||
|
||||
isUnbreakable = isUnbreakable == null ? config.unbreakable() : isUnbreakable;
|
||||
|
||||
final ItemStack output = nbtEditor.addArmorNBTTags(newArmoredElytra, newArmorTier,
|
||||
isUnbreakable, name, lore, color);
|
||||
durabilityManager.setDurability(output, durability, newArmorTier);
|
||||
@ -379,7 +381,6 @@ public class ArmoredElytraBuilder
|
||||
throw new IllegalArgumentException("A regular elytra cannot be combined with an armored one!");
|
||||
|
||||
withColor(getItemColor(newArmoredElytra, item));
|
||||
unbreakable(config.unbreakable());
|
||||
|
||||
addEnchantments(item);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user