mirror of
https://github.com/Auxilor/EcoArmor.git
synced 2025-12-28 11:29:18 +00:00
Added option to set upgrade crystal material
This commit is contained in:
@@ -105,7 +105,7 @@ public class Tier extends PluginDependent {
|
||||
this.requiredTierForApplication = this.getConfig().getString("requires-tier");
|
||||
NamespacedKey key = this.getPlugin().getNamespacedKeyFactory().create("upgrade_crystal");
|
||||
|
||||
ItemStack out = new ItemStack(Material.END_CRYSTAL);
|
||||
ItemStack out = new ItemStack(Objects.requireNonNull(Material.getMaterial(this.getPlugin().getConfigYml().getString("upgrade-crystal-material").toUpperCase())));
|
||||
ItemMeta outMeta = out.getItemMeta();
|
||||
assert outMeta != null;
|
||||
PersistentDataContainer container = outMeta.getPersistentDataContainer();
|
||||
|
||||
@@ -36,10 +36,6 @@ public class CrystalListener extends PluginDependent implements Listener {
|
||||
return;
|
||||
}
|
||||
|
||||
if (cursor.getType() != Material.END_CRYSTAL) {
|
||||
return;
|
||||
}
|
||||
|
||||
Tier crystalTier = ArmorUtils.getCrystalTier(cursor);
|
||||
|
||||
if (crystalTier == null) {
|
||||
@@ -84,9 +80,6 @@ public class CrystalListener extends PluginDependent implements Listener {
|
||||
@EventHandler
|
||||
public void onPlaceCrystal(@NotNull final BlockPlaceEvent event) {
|
||||
ItemStack item = event.getItemInHand();
|
||||
if (item.getType() != Material.END_CRYSTAL) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (ArmorUtils.getCrystalTier(item) != null) {
|
||||
event.setCancelled(true);
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
discover-recipes: true # If all recipes should be automatically discovered.
|
||||
|
||||
# The material for advancement shards.
|
||||
advancement-shard-material: prismarine_shard
|
||||
advancement-shard-material: prismarine_shard # The material for advancement shards.
|
||||
upgrade-crystal-material: end_crystal # The material for upgrade crystals.
|
||||
|
||||
# Effects are passive abilities that happen when wearing a full set with the effect present.
|
||||
effects:
|
||||
|
||||
Reference in New Issue
Block a user