Enchantment Creator
Overview
Enchantment Creator adds real enchantments to your server, defined entirely from the TypeWriter web panel. They are registered in Minecraft's own enchantment registry under the typewriter namespace, so they appear on items, in anvils and in the enchanting table like vanilla ones, without any resource pack or extra plugin.
You describe the enchantment in a definition entry (name, color, supported items, maximum level, costs, active slots), then give it behaviour. There are two ways: a standard definition runs TypeWriter triggers while the enchanted item is worn or held, and a custom definition lists mechanics, each reacting to a game event (attack, block break, bow shot, fall damage...) and running actions. The extension ships more than 70 ready-made action entries (lifesteal, vein miner, homing arrows, frozen armor...) that you plug into mechanics.
Features
- Real enchantments — registered in the server's enchantment registry, with a colored name, max level, anvil cost, weight and enchanting-table costs.
- Two definition types — trigger-based (
enchantment_definition) or mechanic-based (custom_enchantment_definition). - 16 game events — attack, defend, block break, bow shot, projectile hit, fall damage, item damage, armor equip, movement, sneak, sprint and more.
- 70+ ready-made effects — armor, bow, combat, tool and special actions, each with its own fields.
- Enchanted books — give books from an action or from a command, with a custom name and lore.
- World integration — books appear in generated loot chests (
treasureChance) and in librarian trades (tradeChance). - Enchanting table and anvil — custom enchantments can be offered by the enchanting table, restricted to supported items, and made mutually exclusive in the anvil.
- Vanilla blacklist — remove chosen vanilla enchantments from the enchanting table.
- Per-mechanic chance and level — run a mechanic only a percentage of the time, or only at one enchantment level.
- Client-side particles — a particle action shown only to the player.
Installation
- Use a Paper server 1.21 or later, with Java 21. The extension builds enchantments through the server's registry, so it does not work on older versions.
- Make sure the Basic extension of TypeWriter is installed (see the TypeWriter documentation).
- Put the Enchantment Creator JAR in
plugins/Typewriter/extensions/and restart the server.
No other plugin is required.
Getting started
Create a "Vampiric Strike" sword enchantment that heals the wielder on each hit:
- In the TypeWriter web panel, open a manifest page and add a Custom Enchantment Definition.
- Set
nametoVampiric Strike,displayNametoVampiric Strike,nameColortodark_red,maxLevelto3, and add the sword materials tosupportedItems. - Add a Lifesteal action entry on a sequence page, and set
healPercentageto0.2. - Back in the definition, add a mechanic in
mechanics. SeteventtoPLAYER_ATTACK, and select the Lifesteal entry inactions. - Add a Give Enchantment Book action, select your definition in
customEnchantment, and setlevel. Publish. - Trigger the action to get the book, or run
/enchantcreator give <player> Vampiric_Strike 2after adding an Enchantment Command Manifest. Combine the book with a sword in an anvil, and hit a mob.
The effect does not scale with the enchantment level on its own. To make level 3 stronger, add several mechanics with runOnLevel set to 1, 2 and 3, each running an action with different values. runOnLevel 0 means every level.
How it works
The extension checks every online player every 5 ticks (a quarter of a second) to know which of your enchantments they are using. Only the main hand, off-hand and armor count, and only items whose material is in supportedItems. The highest level found is the level used. A short delay can therefore pass between equipping an item and its effects starting.
The two definition types work differently:
- A standard definition (
enchantment_definition) runsactiveTriggersfor the current level. WithcooldownEnabledon, they run again everycooldownwhile the enchantment is active; with it off, they run once when it becomes active.inactiveTriggersrun when it stops.criteriamust pass. - A custom definition (
custom_enchantment_definition) runs its mechanics when the matching game event happens.
Action entries read the game event that triggered them. An action only does something when it is used in a mechanic with the event it was written for (for example, Vein Miner only works on BLOCK_BREAK).
Enchantment events
A mechanic's event is one of:
| Event | Fires when |
|---|---|
PLAYER_ATTACK | The player directly hits an entity. |
PLAYER_DEFEND | The player is damaged by an entity. |
SHIELD_BLOCK | The player is hit while blocking with a shield. |
BLOCK_BREAK | The player breaks a block. |
BOW_SHOOT | The player shoots a bow or crossbow. |
PROJECTILE_HIT | A projectile shot by the player hits something. |
ITEM_CONSUME | The player eats or drinks. |
PLAYER_DEATH | The player dies. |
PLAYER_INTERACT | The player right- or left-clicks. |
ARMOR_EQUIP | The player equips or unequips armor. |
ITEM_DAMAGE | An item loses durability. |
FALL_DAMAGE | The player takes fall damage. |
ENVIRONMENTAL_DAMAGE | The player takes damage not caused by an entity (also fires for fall damage). |
PLAYER_MOVE | The player moves to another block (checked every fourth tick). |
SNEAK | The player starts sneaking. |
SPRINT | The player starts sprinting. |
PLAYER_ATTACK fires when the player is the direct damager, which means melee hits. Damage dealt by an arrow is dealt by the arrow, so it does not fire PLAYER_ATTACK in the current version. The arrow actions that read a damage event (marked below) therefore only act on direct hits.
Ready-made actions
All action entries are used inside a mechanic (actions), or from any sequence. Each has the standard criteria, modifiers and triggers fields, plus its own fields: see the entry pages. The event column tells which event of the mechanic the action needs.
| Group | Actions | Event |
|---|---|---|
| Combat | Armor Pierce, Beheading, Bleed, Blindness Strike, Cleave, Disarm, Executioner, Freeze Strike, Lifesteal, Lightning Strike, Poison Strike, Silence, Vampiric Aura, Wither Strike | PLAYER_ATTACK |
| Armor, when hit | Deflect, Enlightened Armor, Evasion, Frozen Armor, Molten Armor, Regeneration Aura, Resistance Aura, Thorns Advanced, Toxic Aura, Voodoo Armor, Gearing | PLAYER_DEFEND |
| Armor, damage | Angel Wings | FALL_DAMAGE |
| Armor, damage | Implosion Armor, Curse of Vulnerability | any damage event (PLAYER_DEFEND, FALL_DAMAGE, ENVIRONMENTAL_DAMAGE) |
| Armor, equip | Anti Knockback, Health Boost | ARMOR_EQUIP |
| Armor, durability | Hardened Armor | ITEM_DAMAGE |
| Bow, shot | Homing Arrow, Volley Arrow | BOW_SHOOT |
| Bow, impact | Explosive Arrow, Teleport Arrow | PROJECTILE_HIT |
| Bow, damage | Ender Arrow, Healing Arrow, Lightning Arrow, Piercing Shot, Pull Arrow, Push Arrow, Sniper Arrow, Venom Arrow, Web Arrow, Wither Arrow | PLAYER_ATTACK (direct hits only, see note) |
| Tools | Area Miner, Auto Smelt, Experience Boost, Haste, Indestructible, Magnet, Oxygenate, Spawners Silk Touch, Telepathy, Timber, Treasure Hunter, Vein Miner | BLOCK_BREAK |
| Tools | Bedrock Breaker, Green Thumb, Night Vision | PLAYER_INTERACT |
| Tools | Agricultural Harvest | BLOCK_BREAK; it harvests the mature crops around the broken block (up to radius 8) |
| Special | Aquatic Speed, Feeder, Lava Walker | PLAYER_MOVE |
| Special | Elytra Boost, Launch | PLAYER_INTERACT |
| Special | Curse of Sluggishness | PLAYER_ATTACK |
| Special | Elytra Shield | ENVIRONMENTAL_DAMAGE |
| Special | Soulbound | PLAYER_DEATH |
| Utility | Client Particle Effect, Give Enchantment Book | any |
Commands
The command is a Enchantment Command Manifest entry that you create. Its name, permission and messages are fields of the entry; the defaults are shown.
| Command | Description |
|---|---|
/enchantcreator give <player> <enchant> [level] | Give an enchanted book to an online player. <enchant> is the entry name or displayName, with underscores in place of spaces. Level defaults to 1. |
Permissions
| Permission | Grants |
|---|---|
enchantcreator.admin | /enchantcreator give (the adminPermission field of the entry). |
Entries
75 entries, generated from the extension source.
Actions71
- Agricultural Harvest ActionOptimized action for harvesting crops in an AOE, replanting immediately, and merging drops.
- Angel Wings ActionReduces or completely negates fall damage
- Anti Knockback ActionProvides knockback resistance when equipped
- Aquatic Speed ActionDrastically increases movement speed underwater (Dolphin's Grace)
- Area Miner ActionMines blocks in a 3x3 area based on the block broken
- Armor Pierce ActionIgnores armor calculations during melee combat
- Auto Smelt ActionAutomatically smelts mined blocks and yields slightly more experience
- Bedrock Breaker ActionExtremely rare chance to successfully mine Bedrock when left-clicking it
- Beheading ActionHas a chance to drop the victim's head on kill
- Bleed ActionApplies a bleeding effect over time to the target
- Blindness Strike ActionBlinds the target struck
- Cleave ActionDeals area-of-effect (AoE) damage to enemies around the target
- Client Particle EffectRender a Typewriter-aware client particle effect
- Curse of Sluggishness ActionCurse: Applies Slowness and Weakness to the user when attacking
- Curse of Vulnerability ActionCurse: Multiplies all damage taken by the player
- Deflect ActionChance to deflect incoming projectiles back at the attacker
- Disarm ActionForces the attacked player to drop the item in their main hand
- Elytra Boost ActionGives a periodic boost while gliding with Elytra when right-clicking
- Elytra Shield ActionReduces kinetic damage taken from flying into walls
- Ender Arrow ActionDeals massive bonus true damage to End mobs (Enderman, Shulker, Dragon, Endermite)
- Enlightened Armor ActionHas a chance to heal you when attacked
- Evasion ActionGives a chance to completely dodge and cancel incoming damage
- Executioner ActionHas a chance to instantly kill targets below a certain health threshold
- Experience Boost ActionMined blocks drop extra experience
- Explosive Arrow ActionCauses a projectile to explode on impact without breaking blocks
- Feeder ActionPassively restores food while walking
- Freeze Strike ActionSlows and freezes the target
- Frozen Armor ActionSlows and freezes the attacker when they strike you
- Gearing ActionGrants brief speed when hit
- Give Enchantment BookGive a book with a custom enchantment
- Green Thumb ActionPassively bone-meals nearby crops when right-clicking
- Hardened Armor ActionHas a chance to ignore durability loss
- Haste ActionPassively grants Haste while breaking blocks
- Healing Arrow ActionHeals the target instead of damaging them
- Health Boost ActionGrants extra maximum health when equipped
- Homing Arrow ActionModifies a shot arrow to magnetically track the nearest enemy
- Implosion Armor ActionTriggers a massive shockwave when your health drops critically low
- Indestructible ActionHas a chance to repair the tool instead of taking damage when mining
- Launch ActionLaunches the player forward when right clicking with the item
- Lava Walker ActionFreezes lava under your feet into basalt temporarily
- Lifesteal ActionHeals the player based on the damage dealt
- Lightning Arrow ActionStrikes lightning where the arrow hits
- Lightning Strike ActionStrikes lightning on the hit target
- Magnet ActionSucks nearby items towards the player when mining
- Molten Armor ActionSets the attacker on fire when they strike you
- Night Vision ActionApplies Night Vision when interacting with the tool
- Oxygenate ActionRestores breath while breaking blocks underwater
- Piercing Shot ActionCauses the arrow to act as true damage, ignoring armor
- Poison Strike ActionPoisons the target struck
- Pull Arrow ActionPulls the struck target towards the shooter
- Push Arrow ActionInflicts massive knockback to the struck target
- Regeneration Aura ActionGrants passive regeneration when attacked
- Resistance Aura ActionGrants a defensive buff (resistance) when attacked in combat
- Silence ActionSilences the target, applying severe mining fatigue and weakness to prevent them from fighting back effectively
- Sniper Arrow ActionIncreases damage based on the distance the arrow traveled
- Soulbound ActionKeeps the enchanted item in your inventory upon death
- Spawners Silktouch ActionAllows the player to mine and collect Mob Spawners
- Telepathy ActionPlaces mined blocks and items directly into your inventory
- Teleport Arrow ActionTeleports the shooter to the arrow's impact location
- Thorns Advanced ActionReflects a percentage of incoming melee damage back to the attacker
- Timber ActionChops down an entire tree by breaking its bottom log
- Toxic Aura ActionEmits a toxic cloud, poisoning nearby enemies when you take heavy damage
- Treasure Hunter ActionMining simple blocks like Dirt or Stone has a chance to drop Emeralds
- Vampiric Aura ActionHeals all nearby allies when an enemy is killed
- Vein Miner ActionMines a vein of connected identical ores
- Venom Arrow ActionPoisons the target struck by the arrow
- Volley Arrow ActionShoots additional arrows in a cone shape
- Voodoo Armor ActionHas a chance to apply Weakness to the attacker
- Web Arrow ActionEncases the target in a temporary cobweb
- Wither Arrow ActionApplies wither effect to the target struck by the arrow
- Wither Strike ActionApplies wither effect to the target struck
Commands1
- Enchantment Command ManifestAdmin command for giving custom enchantment books
Manifests3
- Custom Enchantment DefinitionDefines a custom enchantment with modular mechanics
- Enchantment DefinitionDefines a custom enchantment
- Vanilla Enchantment Blacklist DefinitionBlacklist vanilla enchantments from the enchanting table
Troubleshooting
The effect does nothing. The action must match the mechanic's event (see the table above): an action reading a block-break event does nothing on PLAYER_ATTACK. The item must be in supportedItems, held in a hand or worn as armor, and the mechanic's criteria, chance and runOnLevel must pass. A mechanic with runOnLevel 2 only runs when the highest level is exactly 2.
The enchantment is missing in game. Definitions are registered when the extension starts, when a player joins, and when a book is given. Check the console for Failed to reflectively register or Failed to register enchantments during pre-login, and make sure the server is Paper 1.21 or later.
The book cannot be applied to my item. In the anvil, a book can only be applied to items listed in supportedItems. Two enchantments listed in each other's exclusiveWith cannot be combined: the anvil result is removed. This exclusivity is only enforced in the anvil.
Players never see my enchantment in the enchanting table. In the table, weight is used as a percentage: 1 means about a 1% chance per roll. Raise it, or set treasureChance and tradeChance to hand out books through loot and librarians. A weight of 0 disables the table offer.
/enchantcreator give says the enchantment is unknown. The name is matched against the entry name or displayName, lower-cased with spaces turned into underscores. Use the exact name from the entry, and publish the page first.
A vanilla enchantment still appears. The blacklist only removes offers from the enchanting table; anvils, loot and trades are not affected. The console reports Unable to resolve vanilla enchantments for blacklist if a name is invalid.