Added config option for auto discovery
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user