Skip to content

Releases: EndlessCodeGroup/Mimic

Mimic v0.8.0

18 Apr 19:56
867a4cc
Compare
Choose a tag to compare

PlayerInventory API

This version introduces new experimental PlayerInventory API.
For now, it can be used only to get player's inventory content and equipped items.
It can be useful for integration with plugins providing custom player inventory.

// Get player's inventory
Mimic mimic = Mimic.getInstance();
BukkitPlayerInventory inventory = mimic.getPlayerInventory(player);

// Get items equipped on the player
List<ItemStack> equippedItems = inventory.getEquippedItems();
// Get not equipped items stored in the inventory
List<ItemStack> storedItems = inventory.getStoredItems();
// Get both equpped and not equipped items
List<ItemStack> allItems = inventory.getItems();

This API is experimental, so it can be changed further.
I'll do my best to save backward compatibility but in some cases it is not possible.
It also means I'm open for ideas how to improve this API to make it more useful.
Please, write me in Discord or file an issue if you have any ideas.

API changes

  • Make implementations ID validation less strict.
    Since now, it may contain more special symbols: ._-
  • Make ServicesManager extensions inaccessible from Java

Plugin changes

  • Added command /mimic inventory info to get info about current player inventory provider

Fixed

  • Catch not only Exceptions from ItemsRegistry implementations but also Errors.
    ItemsRegistry will not crash other plugins.

Housekeeping

  • Versioning strategy changed.
    Now version always includes PATCH version according to SemVer.
  • Update Kotlin to 1.6.20
  • Update bStats to 3.0.0
  • Update ACF to 0.5.1-SNAPSHOT
  • Update Gradle to 7.4.2
  • Update Dokka to 1.6.20
  • Update binary-compatibility-validator to 0.9.0
  • Update gradle-download-task to 5.0.5

Full Changelog: v0.7.1...v0.8.0

Mimic v0.7.1

19 Feb 10:52
b00b2cc
Compare
Choose a tag to compare

Fixed

  • Compatibility with Minecraft 1.13 - 1.16.5
  • FileNotFoundException on config initialization

Full Changelog: v0.7...v0.7.1

Mimic v0.7

06 Feb 13:30
e47f597
Compare
Choose a tag to compare

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

Mimic v0.6.3

07 Jan 19:30
Compare
Choose a tag to compare

Fixed

  • Update MMOItems and MMOCore to the latest version

Full Changelog: v0.6.2...v0.6.3

Mimic v0.6.2

29 Dec 12:32
aba2cc5
Compare
Choose a tag to compare

API Changes

  • Added vararg variants of ClassSystem methods

Fixed

  • Check plugin exists before registering built-in integrations
  • Isolate MimicItemsRegistry from exceptions thrown from other items registries implementations.

Housekeeping

  • Update Kotlin to 1.6.10
  • Update Gradle to 7.3.3
  • Migrate tests to MockK and Kotest assertions

Mimic v0.6.1

23 Aug 21:05
31fb942
Compare
Choose a tag to compare

Fixed

  • MimicApiLevel.checkApiLevel now works correctly

Mimic 0.6

19 Aug 06:24
7ae0f1c
Compare
Choose a tag to compare

API

  • Add MimicApiLevel class to check current running Mimic API version:
    // Specify here the version required for APIs you use.
    if (!MimicApiLevel.checkApiLevel(MimicApiLevel.VERSION_0_6)) {
        println("At least Mimic 0.6 is required. Please download it from {link here}")
    }
  • Add optional payload to ItemsRegistry.getItem. It may be used to customize item.

Bukkit Plugin

  • More detailed output of command /mimic items info:
    Items Service: mimic
    Known IDs amount: 1161
      rpginventory: 4
      quantumrpg: 55
      mmoitems: 126
      minecraft: 976
    
  • Improve integration with Heroes class system (#14)
  • Add statistics about used items registries
  • Add payload support to MinecraftItemsRegistry.

Housekeeping

  • Add API binary compatibility validation
  • Publish docs to GitHub Pages
  • Update Kotlin to 1.5.21
  • Update bukkit-gradle to 0.10.0
  • Update Gradle to 7.2

Mimic 0.5

17 Jan 20:28
22b6813
Compare
Choose a tag to compare

Added

  • MMOItems items registry (#11)
  • MMOCore classes and levels systems (#11)
  • Heroes classes and levels systems (#12)
  • QuantumRPG items registry, classes and levels systems (#13)

Changed

  • Some minor API changes. Be careful on update.

Release v0.4

08 Aug 14:39
Compare
Choose a tag to compare
Release v0.4 Pre-release
Pre-release

Breaking changes

Simplify ClassSystem API. Remove required word from function names.

Release v0.3

08 Aug 11:52
caaac45
Compare
Choose a tag to compare
Release v0.3 Pre-release
Pre-release

New

  • Plugin added to bStats
  • Added CustomItems support
  • Improved default implementations hooking
  • Added command /mimic info

Breaking changes

  • Packages changed:
    • Added level, classes and items packages for several APIs
    • ru.endlesscode.mimic.bukkit -> ru.endlesscode.mimic
  • Provider now is class and not a static field