Mimic icon

Mimic -----

Vault of common RPG APIs



Mimic v0.7
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.

Code (Java):
Mimic mimic = Mimic. getInstance ( ) ;

// Register ItemsRegistry implementation
mimic. registerItemsRegistry ( new MyItemsRegistry ( ), 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.
----------, Feb 6, 2022
Resource Information
Author:
----------
Total Downloads: 2,941
First Release: Aug 8, 2020
Last Update: Apr 18, 2022
Category: ---------------
All-Time Rating:
2 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings