Skip to content

Commit

Permalink
Added HIDE_UNBREAKABLE item flag to kit items
Browse files Browse the repository at this point in the history
  • Loading branch information
Despical committed Jul 11, 2024
1 parent a5700fb commit b10bc72
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/me/despical/kotl/kits/Kit.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemFlag;
import org.bukkit.inventory.ItemStack;

import java.util.HashMap;
Expand All @@ -49,7 +50,7 @@ public Kit(FileConfiguration config, String path) {

for (final var item : config.getStringList(path + "items")) {
var array = item.split(":");
var builder = new ItemBuilder(XMaterial.valueOf(array[1].toUpperCase())).unbreakable(true);
var builder = new ItemBuilder(XMaterial.valueOf(array[1].toUpperCase())).unbreakable(true).flag(ItemFlag.HIDE_UNBREAKABLE);

if (array.length == 4) {
builder.enchantment(Enchantment.getByName(array[2].toUpperCase()), NumberUtils.getInt(array[3], 1));
Expand Down

0 comments on commit b10bc72

Please sign in to comment.