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
log_levelstringinfoPlugin log level, one of debug / verbose / info / warn / error / off

Since 1.15.2.0, the debug option has been replaced by log_level. The plugin migrates the old value automatically on startup (debug: true → log_level: debug), so no manual change is needed.

Recipe Settings ​

KeyTypeDefaultDescription
remove_all_vanilla_recipebooleanfalseRemove all vanilla recipes
enable_anvil_recipebooleantrueEnable custom anvil recipes
ingredient.try_all_possible_item_idbooleanfalseWhether to try every possible item id of an item when matching ingredients, at a higher performance cost. The old ingredient_match_mode: all is equivalent to true
max_reg_recipe_per_tickinteger100Max recipes registered per tick (anti-lag)
lazy_recipe_syncbooleanfalseHow recipes are synced: false syncs to all online players right after a change; true marks the change first and syncs when the player opens a workbench, furnace, recipe book or similar, avoiding a bandwidth spike
ingredient.use_set_thresholdinteger8Threshold for using a Set instead of a List for ingredient matching, 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, including vanilla recipes and recipes registered by other plugins.

recipes matches the recipe key used when crafting, and accepts regular expressions:

  • A regex only blocks recipes whose key matches, for example minecraft:.* blocks vanilla recipes only and craftorithm:.* blocks Craftorithm recipes only.
  • * (or .*) matches every recipe.

Vanilla recipes and recipes from other plugins have no recipe key available during crafting, so only a rule written with * can block them; minecraft:.* does not match vanilla recipes.

Crafter

Inside the crafter (Crafter block), only recipes registered by Craftorithm can be blocked. Ingredient restrictions do not apply to vanilla or third-party recipes there. Every other crafting method (crafting table, furnace, blast furnace, smoker, campfire, brewing, anvil, smithing, stonecutter) is covered.

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

Configuration format:

yaml
ingredient:
  restriction_rules:
    # diamond cannot be used in any recipe (including vanilla recipes)
    - type: item_id # Block by item ID
      item_id: minecraft:diamond
      recipes:
        - '*'
    # items with this lore cannot be used in any recipe
    - type: lore # Block by lore (color codes are ignored during matching)
      lore: Cannot be used for crafting
      recipes:
        - '*'
    # block only in one Craftorithm recipe
    - type: lore
      lore: Cannot be used in this recipe
      recipes:
        - craftorithm:my_recipe

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(24 listener classes)Listener classes that are not isolated and can detect Craftorithm recipes; entries ending with * match by class-name prefix, others match the exact class name

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
# Plugin log level, one of debug / verbose / info / warn / error / off
log_level: info
# Max recipes registered per tick, lower values reduce server lag
max_reg_recipe_per_tick: 100
# Ingredient related settings
ingredient:
  # Whether to try every possible item id of an item when matching ingredients
  # Enabling this costs more performance
  try_all_possible_item_id: false
  # Threshold for using a Set instead of a List for ingredient matching, improves performance with many ingredient types
  use_set_threshold: 8
  # Rules that restrict which items may be used as ingredients
  # Supported rule types: lore (matched by lore), item_id (matched by item id)
  # Third-party plugins may register custom rule types
  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 in this recipe
      recipes:
        - craftorithm:my_recipe
# 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
  - com.leonardobishop.quests.bukkit.tasktype.type.*
  - org.betonquest.betonquest.lib.bukkit.event.*
  - com.notquests.paper.events.*
  - fr.skytasul.quests.QuestsListener
  - fr.skytasul.quests.stages.StageCraft
  - fr.skytasul.quests.stages.StageMelt
  - com.ordwen.odailyquests.events.listeners.item.*
  - com.typewritermc.engine.paper.entry.*

基于 MIT 许可证发布