Skip to content

config.yml Reference ​

The main configuration file plugins/Craftorithm/config.yml controls core plugin behavior.

Configuration Keys ​

Basic Settings ​

KeyTypeDefaultDescription
check_updatebooleantrueCheck for updates on startup
debugbooleanfalseDebug mode

Recipe Settings ​

KeyTypeDefaultDescription
remove_all_vanilla_recipebooleanfalseRemove all vanilla recipes
enable_anvil_recipebooleantrueEnable custom anvil recipes
use_experimental_recipe_ingredientsbooleantrueEnable experimental recipe ingredients (1.21.3+ stonecutter recipes unaffected by NBT/component changes)
max_reg_recipe_per_tickinteger100Max recipes registered per tick (anti-lag)
ingredient_use_set_thresholdinteger8Threshold for using HashSet instead of ArrayList for ingredient matching when multiple item types are allowed, improves performance with many ingredient types
save_discovered_recipes.enablebooleantrueEnable storing players' discovered recipes in the database. When enabled, players' discovered recipes are saved to the database and restored on player join, plugin reload and server startup
save_discovered_recipes.join_discover_delay_ticksinteger20Delay in ticks after a player joins before loading discovered recipes from the database
save_discovered_recipes.interval_ticksinteger6000Interval in ticks for periodically saving online players' discovered recipes to database (default 300 seconds / 5 minutes)

Item Settings ​

KeyTypeDefaultDescription
item_plugin_hook_prioritylist(ordered list)External item plugin detection priority
cannot_craft_itemslist[]Item IDs that cannot be used in crafting — removed 1.13.4.0
blocked_crafting_lore_ruleslist[]Prevent items with specified lore from being used in crafting — removed 1.13.5.0
ingredient_restriction_ruleslist[]Block items from being used in crafting through configurable rules, replaces both features above

ingredient_restriction_rules allows you to set rules that prevent matching items from being used as ingredients for specified recipes. This applies to all recipe types.

The plugin automatically converts existing cannot_craft_items and blocked_crafting_lore_rules settings — no manual migration needed.

Configuration format:

yaml
ingredient_restriction_rules:
  - type: item_id # Block by item ID
    item_id: minecraft:diamond
    recipes:
      - .* # Match all recipes
  - type: lore # Block by lore (color codes are ignored during matching)
    lore: Cannot be used for crafting
    recipes:
      - .*
  - type: lore
    lore: Cannot be used for vanilla recipes
    recipes:
      - minecraft:.* # Match all vanilla recipes
      - craftorithm:vanilla_shaped # Exact match

Command Settings ​

KeyTypeDefaultDescription
main_command_aliaseslist[cra, craft, crafto]Main command aliases

Integration Settings ​

KeyTypeDefaultDescription
bstatsbooleantrueEnable bStats statistics

Compatibility Settings ​

KeyTypeDefaultDescription
not_convert_listener_classeslist(17 listener classes)Listener classes that are not isolated, can detect Craftorithm recipes

Example ​

yaml
# Whether to check for updates
check_update: true
# Whether to remove all vanilla recipes
remove_all_vanilla_recipe: false
# Whether to allow bStats usage data collection
bstats: true
# Whether to enable anvil recipes
enable_anvil_recipe: true
debug: true
# Max recipes registered per tick, lower values reduce server lag
max_reg_recipe_per_tick: 100
# Enable experimental recipe ingredients
# When enabled, recipe ingredient identification is not affected by NBT/component changes (except 1.21.3+ stonecutter recipes), but may cause issues in recipe book
use_experimental_recipe_ingredients: true
# Threshold for using HashSet instead of ArrayList for ingredient matching when multiple item types are allowed
ingredient_use_set_threshold: 8
# Hook item plugins in the order listed above for item detection priority
# Item plugins not in this list will not be hooked unless they actively hook into Craftorithm
item_plugin_hook_priority:
  - CustomFishing
  - CraftEngine
  - Nexo
  - AzureFlow
  - SX-Item
  - EmakiItem
  - NeigeItems
  - ItemsAdder
  - Oraxen
  - EcoItems
  - ExecutableItems
  - MMOItems
  - MythicMobs
  - Craftorithm
# Plugin main command aliases, only read once on startup
main_command_aliases:
  - cra
  - craft
  - crafto
# Listener classes that are not isolated, can detect Craftorithm recipes
not_convert_listener_classes:
  - a4.papers.chatfilter.chatfilter.events.AnvilListener
  - com.ghostchu.quickshop.shade.tne.menu.paper.listener.PaperInventoryClickListener
  - com.earth2me.essentials.EssentialsPlayerListener
  - net.coreprotect.listener.player.InventoryChangeListener
  - net.coreprotect.listener.player.CraftItemListener
  - com.extendedclip.deluxemenus.listener.PlayerListener
  - com.dre.brewery.listeners.InventoryListener
  - com.xyrisdev.svalues.shaded.library.menu.MenuManager$InventoryListener
  - me.arcaniax.hdb.listener.InventoryListener
  - net.momirealms.craftengine.bukkit.item.listener.ItemEventListener
  - net.momirealms.customfishing.bukkit.hook.BukkitHookManager
  - net.momirealms.customfishing.bukkit.market.BukkitMarketManager
  - dev.jsinco.recipes.listeners.Events
  - fr.moribus.imageonmap.image.MapInitEvent
  - com.badbones69.crazycrates.paper.listeners.crates.types.WarCrateListener
  - com.ryderbelserion.fusion.paper.api.builders.gui.listeners.GuiListener
  - club.kid7.bannermaker.pluginutilities.gui.CustomGUIInventoryListener
ingredient_restriction_rules:
  - type: item_id
    item_id: minecraft:diamond
    recipes:
      - .*
  - type: lore
    lore: Cannot be used for crafting
    recipes:
      - .*
  - type: lore
    lore: Cannot be used for vanilla recipes
    recipes:
      - minecraft:.*
      - craftorithm:vanilla_shaped

基于 GPL-3.0 许可证发布