AdvancedEnchantments
Get AdvancedEnchantmentsJoin DiscordUnlimited Minecraft Hosting
  • AdvancedEnchantments
  • ➡️AdvancedEnchantments UI
  • 🪄Enchantments
    • 📑List of Enchantments
      • Default Enchants (250+)
      • Cosmic Enchants (200+)
      • Vanilla+ Custom Enchants (60+)
    • Creating Enchantments
      • Triggers
      • Effects
      • Area of Effect
      • Settings
      • Effect Info
      • Complex Enchantments
    • Enchantment Conditions
    • ⏱️Repeating Enchantments
  • ℹ️General Information
    • Commands & Permissions
      • AEGive
    • Languages and Localization
    • 🔩Plugin Items
      • All plugin items
      • Item Configuration
      • Slot Increasers
    • Toggling Features
  • ⚙️Configuration
    • Random Loot, Villager Trades and Mob Drops
    • Default Files
    • Enchanter
    • Souls
    • Unsuccessful enchants
    • Per-Level Descriptions
    • Per-Level Books
    • Enchantments In Essentials Kits
    • GKits
      • GKit Permissions
      • Colored Leather Armor
    • Armor Sets
    • Drag&Drop books onto Player Heads
    • Groups
  • 💻For developers
    • Plugin API
    • Create Custom Effects
    • Plugin Compatiblity issues
  • Plugin Information
    • PlaceholderAPI placeholders
    • FAQ & Other Plugin Support
Powered by GitBook
On this page
  • Multiple Blocks Break / Performance on block break
  • TP_DROPS duplicating drops to multiple inventories

Was this helpful?

  1. For developers

Plugin Compatiblity issues

Issues you might encounter with other plugins conflicting with AE and how to fix them

Multiple Blocks Break / Performance on block break

The most common issue is two plugins calling new BlockBreakEvents in loop and both breaking the blocks.

With Auxilor plugins (Eco plugins) and Veinminer plugin author Choco we have decided to mark blocks which are involved in these operations with same metadata. If your plugin also calls events and breaks blocks, you might need to check this metadata and ignore the block event if present

The metadata is blockbreakevent-ignore

You can also check for these blocks using AEAPI method

AEAPI.ignoreBlockEvent(block);

TP_DROPS duplicating drops to multiple inventories

This issue occurs when two or more plugins handle adding the drop to some inventory. You can stop us from adding the drops to player inventory by flagging the block with any metadata and adding this metadata in our config.yml

  # Will ignore items drops from blocks with the following meta. Their drops will be ignored and won't be handled by us.
  # No need to add anything here unless you have compatibility issues with other plugins producing multiple drops.
  # https://ae.advancedplugins.net/for-developers/plugin-compatiblity-issues#tp_drops-duplicating-drops-to-multiple-inventories
  ignored-metadata-block-drops:
    - "some-random-metadata"

Or by using our API method inside AEAPI class

AEAPI.addIgnoreBlockWithMeta("some-random-metadata");

Then on BlockBreakEvent, you need to set the metadata before us. We are currently running our checks on priority HIGH, so anything lower than that will work.

@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
private void onBlockBreak(BlockBreakEvent event) {
    event.getBlock().setMetadata("some-random-metadata", new FixedMetadataValue(EffectsHandler.getInstance(), true));
}

To avoid memory leaks, after you are done with the block, remove the metadata

block.removeMetadata("some-random-metadata", plugin);
PreviousCreate Custom EffectsNextPlaceholderAPI placeholders

Last updated 10 months ago

Was this helpful?

💻