How kencenggame/piggycustomenchants works
PiggyCustomEnchants is a PocketMine-MP plugin for applying and running more than 90 custom enchantments. Its user-facing path is a player issuing /ce enchant to create an enchanted book, then combining that book with an item; equipped or held enchantments subsequently react to game events, tick, or toggle effects. The plugin initializes configuration, registrations, command handling, and event/tick dispatch. The README documents configurable enchant metadata, disabled-enchantment settings, and explosive world damage. Several enchant implementations are unsampled, so their detailed behavior and links are not inferred.
Main entry points: PiggyCustomEnchants.php Plugin startup · enchants Enchant implementations · EventListener.php Event listener · CustomEnchantManager.php Enchant registry
Components 22
Plugin core
- Plugin startup
src/DaPigGuy/PiggyCustomEnchants/PiggyCustomEnchants.php - Enchant registry
src/DaPigGuy/PiggyCustomEnchants/CustomEnchantManager.php - Event listener
src/DaPigGuy/PiggyCustomEnchants/EventListener.php - Tick scheduler
src/DaPigGuy/PiggyCustomEnchants/tasks/TickEnchantmentsTask.php
Player commands
- Command router
src/DaPigGuy/PiggyCustomEnchants/commands/CustomEnchantsCommand.php - Enchant item command
src/DaPigGuy/PiggyCustomEnchants/commands/subcommands/EnchantSubCommand.php - Other CE commands
src/DaPigGuy/PiggyCustomEnchants/commands/subcommands
Enchant runtime
- Enchant implementations
src/DaPigGuy/PiggyCustomEnchants/enchants - Enchant base
src/DaPigGuy/PiggyCustomEnchants/enchants/CustomEnchant.php - Enchant identifiers
src/DaPigGuy/PiggyCustomEnchants/enchants/CustomEnchantIds.php - Reactive enchant API
src/DaPigGuy/PiggyCustomEnchants/enchants/ReactiveEnchantment.php - Reactive behavior
- Ticking enchant API
- Toggle enchant API
- Tick and toggle traits
Gameplay systems
- Custom projectiles
src/DaPigGuy/PiggyCustomEnchants/entities - Projectile tracker
src/DaPigGuy/PiggyCustomEnchants/utils/ProjectileTracker.php - Explosion behavior
src/DaPigGuy/PiggyCustomEnchants/utils/PiggyExplosion.php - Obsidian block
src/DaPigGuy/PiggyCustomEnchants/blocks/PiggyObsidian.php - Gameplay utilities
src/DaPigGuy/PiggyCustomEnchants/utils/Utils.php
Other components
- Player
- PocketMine server
Connections 24
- Player → Command router: issues command
README.md - Command router → Enchant item command: routes subcommand
src/DaPigGuy/PiggyCustomEnchants/commands/CustomEnchantsCommand.php - Command router → Other CE commands: registers subcommands
src/DaPigGuy/PiggyCustomEnchants/commands/CustomEnchantsCommand.php - Player → Enchant item command: requests book enchant
README.md - Enchant item command → Enchant registry: looks up enchants
src/DaPigGuy/PiggyCustomEnchants/commands/subcommands/EnchantSubCommand.php - Enchant item command → Player: applies enchanted book
README.md - Plugin startup → Enchant registry: registers enchants
src/DaPigGuy/PiggyCustomEnchants/CustomEnchantManager.php - Enchant registry → Enchant implementations: registers implementations
src/DaPigGuy/PiggyCustomEnchants/CustomEnchantManager.php - Enchant registry → Enchant identifiers: uses enchant IDs
src/DaPigGuy/PiggyCustomEnchants/CustomEnchantManager.php - Enchant implementations → Enchant base: extends enchant base
src/DaPigGuy/PiggyCustomEnchants/enchants/armor/boots/JetpackEnchant.php - Enchant base → Enchant identifiers: uses identifier constants
src/DaPigGuy/PiggyCustomEnchants/enchants/CustomEnchant.php - Reactive enchant API → Reactive behavior: uses behavior trait
src/DaPigGuy/PiggyCustomEnchants/enchants/ReactiveEnchantment.php - Toggle enchant API → Tick and toggle traits: uses toggle trait
- Event listener → Reactive enchant API: dispatches reactions
src/DaPigGuy/PiggyCustomEnchants/EventListener.php - Event listener → Toggle enchant API: dispatches toggles
src/DaPigGuy/PiggyCustomEnchants/EventListener.php - Plugin startup → Event listener: registers events
src/DaPigGuy/PiggyCustomEnchants/PiggyCustomEnchants.php - Plugin startup → Tick scheduler: schedules ticks
src/DaPigGuy/PiggyCustomEnchants/PiggyCustomEnchants.php - Tick scheduler → Enchant implementations: ticks equipped enchants
src/DaPigGuy/PiggyCustomEnchants/tasks/TickEnchantmentsTask.php - Reactive behavior → Projectile tracker: tracks projectiles
- Event listener → Custom projectiles: handles projectile entities
src/DaPigGuy/PiggyCustomEnchants/EventListener.php - Plugin startup → PocketMine server: registers plugin services
src/DaPigGuy/PiggyCustomEnchants/PiggyCustomEnchants.php - Enchant implementations → Explosion behavior: uses explosion helper
src/DaPigGuy/PiggyCustomEnchants/utils/PiggyExplosion.php - Enchant implementations → Gameplay utilities: uses gameplay helpers
src/DaPigGuy/PiggyCustomEnchants/enchants/CustomEnchant.php - Plugin startup → Obsidian block: initializes block integration
src/DaPigGuy/PiggyCustomEnchants/PiggyCustomEnchants.php