Skip to content

Mimic v0.7

Compare
Choose a tag to compare
@osipxd osipxd released this 06 Feb 13:30
· 46 commits to develop since this release
e47f597

This version has issues breaking compatibility with Minecraft 1.13 - 1.16.5, please use v0.7.1 instead.

BE CAREFUL!
This update brings breaking changes for ClassSystem and LevelSystem registration.
Please verify levels and classes integrations works properly after update to Mimic v0.7.

New implementations registration API

Registration via ServiceManager is deprecated because it was error-prone and not intuitive.
Since now, you should use class Mimic to register or get APIs implementations.

Mimic mimic = Mimic.getInstance();

// Register ItemsRegistry implementation
mimic.registerItemsRegistry(new MyItemsRegistry(), MimicApiLevel.CURRENT, plugin);

// Get items registry imlpementation
BukkitItemsRegistry registry = mimic.getItemsRegistry();

New mechanism allows maintaining better backward compatibility for APIs implementations.
It also allows users to select preferred APIs implementation via config.

API Changes

  • Added default implementations for MimicService methods:
    • isEnabled() returns true by default
    • getId() returns lowercase plugin name by default
  • Breaking change! ID should contain only lowercase Latin letters and digits (a-z, 0-9).
  • Breaking change! BukkitClassSystem.Provider and BukkitLevelSystem.Provider converted to interface instead of abstract classes.
    If you want to use ID different from plugin name, you should override getId() method.
  • BukkitClassSystem.Provider and BukkitLevelSystem.Provider are functional interfaces since now.

Plugin changes

  • Added config file allowing to specify preferred APIs implementations.
  • Fixed errors in case when commands used from console.

Full Changelog: v0.6.3...v0.7