-
Notifications
You must be signed in to change notification settings - Fork 0
T | Migration Guide (v1.1 → v1.2 )
- 1. Overview
- 2. What Changed in v1.2+?
- 3. Breaking Changes
- 4. Required Steps for Migration
- 5. Updated Patterns & Best Practices
- 6. FAQ & Troubleshooting
- 7. See Also
This guide helps you migrate your FXItems setup, addons, and custom content from v1.1 or earlier to v1.2+.
Version 1.2 introduces major API, utility, and registration changes for improved extensibility, stability, and performance.
-
New API Interfaces:
-
com.noctify.API.Registryandcom.noctify.API.Utilsinterfaces. - Concrete implementations:
RegistryAPI,UtilsAPI.
-
-
Utility Overhaul:
- Utilities (cooldowns, mana, projectiles, entity sizing, etc.) now accessed via
UtilsAPI.
- Utilities (cooldowns, mana, projectiles, entity sizing, etc.) now accessed via
-
Auto-Registration System:
- Items, foods, events, and commands can be auto-registered by placing them in the correct package.
-
Expanded Addon Support:
- Addons/plugins can register their own content via the new APIs.
-
Improved Permission and Command Handling:
- Permissions and commands are now centrally registered and managed.
-
Updated Dependencies:
- Java 17+ required, PaperMC 1.21+ recommended.
- Optional ModelEngine and EntitySize integrations updated.
-
Direct Static Registration is deprecated:
- Do NOT register items, foods, events, or commands directly to static maps or lists.
- Use
RegistryAPIfor all content registration.
-
Legacy Utility Classes have moved/changed:
- All utility access should use
UtilsAPI.
- All utility access should use
-
Event and Command Classes:
- Must be registered via the registry or be in the auto-registration package.
-
Custom Items & Foods Structure:
- Item/food class and registration structure may require minor updates for auto-registration.
- Update your
pom.xmlorbuild.gradleto require Java 17+ and target PaperMC 1.21+. - Add/update dependencies for EntitySize, ModelEngine, and PlaceholderAPI as needed.
- Replace any direct static registration with
RegistryAPIcalls. - Example (old):
New:
ItemRegistry.registerItem("MY_ITEM", myItemDef);
Registry registry = new RegistryAPI(); registry.registerItem("MY_ITEM", myItemDef);
- Replace direct calls to utility classes (e.g.,
CooldownUtils,ManaUtils) withUtilsAPI. - Example (old):
New:
CooldownUtils.setCooldown(uuid, "test", 30);
Utils utils = new UtilsAPI(); utils.setCooldown(uuid, "test", 30);
- Move custom item/food/command/event classes into the correct
com.noctify.Customsub-packages for auto-registration. - Remove redundant manual registration if auto-registration is used.
- Ensure your permission nodes match those in
plugin.yml. - Update permission checks and documentation for new commands/utilities.
- If using ModelEngine or EntitySize, check for plugin presence before using related utilities (see examples in new docs).
-
Always use the API (
RegistryAPI,UtilsAPI) for all integration. - Place content in the correct package for auto-registration.
-
Use interfaces (
Registry,Utils) for type safety and forward compatibility. - Test all custom content after migration, especially items/foods with unique behaviors.
Q: My custom items aren’t appearing after upgrade!
A: Make sure your items are registered with RegistryAPI or are located in the correct package for auto-registration.
Q: Why do I get errors about missing methods or fields?
A: You may still be using legacy static access. Update your code to use the new APIs.
Q: Do I need to rewrite all my custom event/command/item classes?
A: No, just ensure registration and utility access match the new API patterns. Most class logic can remain unchanged.
Q: How do I update my addon?
A: Make sure your plugin.yml lists FXItems as a dependency and use the new registration/utilities patterns.
- S | Auto-Registration System
- Q | FXItems API & Making Addons
- A | Getting Started & Plugin Overview
- FXItems README
- Home
- A | Getting Started & Plugin Overview
- B | The Registry System: Items, Foods, Commands, Events
- C | Creating Custom Items
- D | Creating Custom Foods
- E | Advanced: Custom Effects in FXItems
- F | Creating Custom Commands
- G | Creating Custom Events & Behaviors
- H | Utility: CooldownUtils
- I | Utility: CustomItemUtils
- J | Utility: EffectUtils
- K | Utility: ManaUtils
- L | Utility: OneTimeCraftUtils
- M | Utility: TeleportUtils
- N | Utility: ProjectileUtils
- O | Utility: GammaUtils
- P | Utility: EntitySizeUtils
- Q | FXItems API (com.noctify.API) & Making Addons
- R | Advanced Techniques, Gotchas & FAQ
- S | Auto-Registration System
- T | Migration Guide (v1.1 → v1.2+)
- U | Changelog