Skip to content

Mimic v0.8.0

Latest
Compare
Choose a tag to compare
@github-actions github-actions released this 18 Apr 19:56
867a4cc

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