diff --git a/eco-core/core-plugin/src/main/java/com/willfp/talismans/talismans/util/DiscoverRecipeListener.java b/eco-core/core-plugin/src/main/java/com/willfp/talismans/talismans/util/DiscoverRecipeListener.java index 05d97ce..f2307b6 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/talismans/talismans/util/DiscoverRecipeListener.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/talismans/talismans/util/DiscoverRecipeListener.java @@ -1,5 +1,6 @@ package com.willfp.talismans.talismans.util; +import com.willfp.eco.util.config.Configs; import com.willfp.talismans.talismans.Talisman; import com.willfp.talismans.talismans.Talismans; import org.bukkit.entity.Player; @@ -18,6 +19,8 @@ public class DiscoverRecipeListener implements Listener { public void onJoin(@NotNull final PlayerJoinEvent event) { Player player = event.getPlayer(); - Talismans.values().stream().filter(Talisman::isEnabled).map(Talisman::getKey).forEach(player::discoverRecipe); + if (Configs.CONFIG.getBool("crafting.discover")) { + Talismans.values().stream().filter(Talisman::isEnabled).map(Talisman::getKey).forEach(player::discoverRecipe); + } } } diff --git a/eco-core/core-plugin/src/main/resources/config.yml b/eco-core/core-plugin/src/main/resources/config.yml index cf3ad22..d577602 100644 --- a/eco-core/core-plugin/src/main/resources/config.yml +++ b/eco-core/core-plugin/src/main/resources/config.yml @@ -15,6 +15,9 @@ strengths: relic: color: "&d" +crafting: + discover: true # If players should automatically have recipes added to their crafting table. + read-enderchest: true # If a player's ender chest should be checked for talismans read-shulkerboxes: true # If a player's shulker boxes should be checked for talismans