Added new methods, updated metrics, fixed bugs
Bukkit side:
+ Moved metrics from Bukkit to the Shared section
+ To the BukkitLoader added private field "metrics"
+ Added new methods to the ItemMaker:
* public Map<String, Object> serializeToMap() Serialize whole ItemMaker to Map which can be saved & loaded from Config
* public String getFormattedOwnerType() get formatted name of method int getHeadOwnerType() which is located in the HeadItemMaker
-> PLAYER_NAME, VALUES or URL
* public static ItemMaker loadMakerFromJson(Map<String, Object> serializedItem)
* public static ItemStack loadFromJson(Map<String, Object> serializedItem)
+ ItemMaker is now finally able to load & save items in the Bundle & ShulkerBox
+ XMaterial class now uses TempMap instead of Google cache (This allows plugin to run on all versions!)
* This also resolves error: NoSuchMethodError: com.google.common.cache.CacheBuilder.build()Lcom/google/common/cache/Cache;
+ Fixed compatibility with MC 1.7.10 - PacketHandler not loaded
+ Added new method to the GUI class:
* void onMultipleIteract(Player player, Map<Integer, ItemStack> guiSlots, Map<Integer, ItemStack> playerSlots)
Method is fired when player interact with multiple slots in the same time - like SHIFT, DRAG or PICKUP_ALL
Map contains modified slots with final itemstacks
+ Fixed method onInteractItem
* boolean onInteractItem(Player player, ItemStack newItem, ItemStack oldItem, ClickType type, int slot, boolean gui)
* First ItemStack now actually returns a new ItemStack, which will be replaced at the slot
* Second ItemStack returns the original ItemStack that was (and still is at this point) in the slot
+ Closing all opened GUIs automatically on plugin disable
+ Fixed parsing raw lore from Json
+ Fixed ItemMaker bugs
+ Added new methods to the ItemMaker class:
* ItemStack loadFromConfig(Config config, String path, boolean colorize)
* ItemMaker loadMakerFromConfig(Config config, String path, boolean colorize)
* ItemStack loadFromJson(Map<String, Object> serializedItem, boolean colorize)
* ItemMaker loadMakerFromJson(Map<String, Object> serializedItem, boolean colorize)
Shared side:
+ Added new Selector enum, POSITION (Only for Bukkit side) which checks if argument in the command is NUMBER or contains ~, + or -
+ Added Metrics class for Bukkit, BungeeCord and Velocity
-> new Metrics(pluginVersion, bStatsPluginId) (Require testing)
+ Fixed reading of YAML files (comments before lists)
+ Fixed parsing UUID in the Json -> JsonUtils#writeWithoutParseStatic(Object)
+ Fixed writing String in Json format -> JWriter#writeWithoutParse(Object)
Method put String into ", but forgot to add skip symbol (\) before each " in String
+ Switched default-json-handler from Guava to TheAPI
+ Added 2 new plugin events for developers (called only in our EventListener)
* UserDataLoadEvent - Called when is loading user's Config via API#getUser(UUID/String) method
* UserDataUnloadEvent - Called when is unloading & saving user's Config
+ Added new methods to the EventListener interface:
* default ListenerHolder build()
* default ListenerHolder build(int priority) - Creates an instance of ListenerHolder
+ Modified methods in the EventManager:
* unregister(ListenerHolder) now returns boolean
* call(Event) improved performance
+ Added new methods to the ListenerHolder:
* boolean isRegistered()
* boolean unregister()
* boolean register()
+ Added missing options to the Metrics like logging.
+ Added new constructor to the StringContainer class:
* StringContainer(String text, int offset) - Do same thing as new StringContainer(String#substring(offset)), but using less resources.
+ Fixed reading skip char in the yaml file Woops!
+ Added public static ints to the EventListener as "helpers" for developers - nothing special. (Image below)
+ Small performance tweak; If a TempMap or TempList is empty for more than 5 min, Scheduler that is currently running (in this case an empty map/list) will be cancelled and started again when you put/add something to the map/list.