PiggyCustomEnchant's documentation page includes the configuration and API documentation.

  • Information

    PiggyCustomEnchants is PocketMine-MP's first public custom enchantments plugin created in April 29, 2017 by MCPEPIG (DaPigGuy).
    If you require additional support with our plugin, then feel free to join our discord server.

  • Default Configuration


    Key Index Explanation
    rarity-colors common, uncommon, rare, mythic Any of the following color values are accepted for any index:

    Accepted values: black, dark_blue, dark_green, dark_aqua, dark_red, dark_purple, gold, gray, dark_gray, blue, green, aqua, red, light_purple, yellow, white
    enchants position Choose whether to show enchants in name or lore of the item.

    Accepted values: name, lore
    roman-numerals If set to true, then the plugin will show enchantments in roman numerals. Otherwise, it will show as normal numbers.

    Accepted values: true, false
    forms enabled If set to true then the plugin will use forms instead of chat. Otherwise, it will use chat instead.

    Accepted values: true, false
    disabled-enchantments [] List enchantments that you want to be disabled globally in here.
    Example: ["Porkified", "Gears"]

    Accepted values: enchantment names, enchantment ids
    per-world-disabled-enchants worldNameList enchantments that you want to be disabled per-world here.
    Example: NoJetpacks: ["jetpack"]

    Accepted values: world name, enchantment names, enchantment ids
    world-damage blaze, bombardment, explosive, lightning, missile If set to true, then the enchantments will deal damage to the world. Otherwise, the enchantments will not.

    Accepted values: true, false
    chicken drops List drops that the Chicken enchant should have a chance at dropping (all equal %)
    Example: ["266:0:1", "id:meta:count"]

    Accepted values: item id, item meta, amount of items
    miscellaneous armor-hold-equip Enables PiggyCE's implementation of click/hold armor to equip from hotbar, which is not implemented in pmmp.

    Accepted values: true, false
    chances [enchants] Set the chance to activate REACTIVE-type enchantments. Reaction chances are defined as multiplier ∗ enchantment level.

    Accepted values: lowercase enchantment names, chance multiplier

    Adding/removing a custom enchantment.

    As of v2.0.0, you can add/remove enchantments directly from PocketMine-MP's enchantment functions instead of our own.

    Function Parameters
    $item->addEnchantment(new EnchantmentInstance($enchantment, $level)); $enchantment = ID of custom enchant to add
    $level = level of enchant to add
    $item->removeEnchantment($enchantment); $enchantment = ID of custom enchant to remove

    Getting custom enchantments by name/ID

    Function Parameters Returns
    CustomEnchantManager::getEnchantment(int $id); $id = ID of the custom enchant CustomEnchant if successful, else null.
    CustomEnchantManager::getEnchantmentByName(string $name); $name = name of custom enchant CustomEnchant if successful, else null.

    Registering/unregistering a custom enchantment

    As of v2.0.0, unregistering enchants will also automatically cease task-related activities for those enchants.

    Function Parameters
    CustomEnchantManager::registerEnchantment(new CustomEnchant(Plugin $plugin, int $id, int $rarity = self::RARITY_RARE)); $plugin = your plugin main
    $id = ID of custom enchant
    $rarity = rarity of enchant
    CustomEnchantManager::unregisterEnchantment(int $id); $id = ID of custom enchant

    Any custom enchants that you want to be added? Submit your ideas here!

    Type Enchantment Description
    Enchantment Incompatible Enchants
    Blaze Porkified
    Wither Skull
    Grappling Volley
    Grow Shrink
    Homing Blaze
    Wither Skull
    Porkified Wither Skull