MicroLib icon

MicroLib -----

[Discontinued] A nifty library to suit your plugin development needs! | Shaded or Dependency




  • Mark `Reflection.java` and `JsonConfigFile.java` as `@Beta`.
  • Deprecated `MicroLogger.java`
    • Use your plugin's logger instead - MicroLogger messages don't seem to display correctly on Paper servers anymore.
  • Update copyright and other minor changes.
----------, Apr 2, 2022

v3.2.0
A new MicroLib update, presented to you by ProfliX and I! Big thanks to PX for contributing via a pull request. :)

The QuickTimer class has changed almost completely - it's just as easy to use, and it's more refined. If you're using it please ensure you adjust your own code once you update to this MicroLib version.

Changes:
  • ProfliX and I improved the WholeTitle class:
    • no longer throws errors on 1.7 servers
      • 1.7 servers don't have titles, so MicroLib just skips the request instead of throwing an error.
    • now supports 1.8, 1.9 and 1.10 servers
      • these versions didn't have the newer Player#sendTitle method in the Spigot API, so we are using a deprecated method to fix this without using NMS.
  • ProfliX added the JsonConfigFile class.
    • Just like the YamlConfigFile class, but in the json format ;)
  • ProfliX added random float number generation to the Randoms class.
  • ProfliX and I changed almost all of the QuickTimer class.
    • You can now record time in different units - from nanoseconds, all the way up to days!
    • New instantiation of QuickTimer utilising the desired time unit and an optional start-time parameter.
  • The VersionUtils class was improved:
    • ProfliX added a method to check if the server is running a specific version, using a String#contains check.
    • ProfliX added the ability for the version checker to also check if the server has certain biomes available. This is utilised with the new 1.18 checker.
    • ProfliX fixed the 1.18 version checker and also added a 1.19 version checker. As both versions are not released, we are predicting certain names of biomes and mobs being added, so please be careful if you use these and notify us if they don't work properly.
----------, Nov 26, 2021

MicroLib v3.1.2
  • @lokka30 changed the Consumer import on the update checker.
    • It now uses the Consumer class from java.util.function, not Bukkit's one.
    • If you are using the update checker, you must change your previous import to the Java one when you update to MicroLib 3.1.2.
    • This also means that the update checker no longer requires Minecraft 1.11 to run, you can run it on any version! :)
    • The last outcome of this is that the method no longer throws OutdatedServerVersionException, no need for the try/catch anymore.
  • @lokka30 added a method to check if the server is running PaperMC or any derivative of it such as Airplane and Purpur.
    • Simply assert VersionUtils.isRunningPaper() before running any Paper-dependent code.
  • ProfliX kindly contributed various minor code improvements, such as the addition of nullability annotations.
  • @lokka30 made the OutdatedServerVersionException now extend RuntimeException instead.
----------, Nov 4, 2021

MicroLib v3.1.0
  • I (@lokka30) re-programmed the ItemBuilder class! It should work great now.
    • Note: The new ItemBuilder class has not been tested, please let me know if you use it and run into any issues.
    • Note: Any plugins using the old ItemBuilder will need to update their code.
----------, Oct 8, 2021

MicroLib v3.0.1
  • @lokka30 made the MultiMessage.Placeholder class static, fixing the inability to use the MultiMessage class.
----------, Aug 20, 2021

MicroLib v3.0.0

Important
Server owners! Nothing of your concern this update. Only update if the plugin(s) that use MicroLib have updated to use this version, this version breaks parity with plugins using MicroLib 2 since class paths have changed.

Developers! A lot of upgradeshave been done to the library, check the changelog before updating. Almost all classes have been moved to separate packages in an organisation effort for future-proofing.

Let me know on Discord or via a PM if you have any questions or issues! :)

Changelog
  • Added MultiMessage class at me.lokka30.microlib.messaging.MultiMessage.
    • Makes it far easier to send colored multi-line messages with multiple placeholders.
    • Has already been tested in PhantomWorlds 2 and is working really well. Will be implemented in my other plugins over time.
  • Moved a lot of classes into separate sub-packages for organisation purposes. The location after 'Moved <...>' is the new location of the class. I apologise if this is frustrating although it had to be done sooner or later due to the increasing capabilities of this library.
    • Moved me.lokka30.microlib.MessageUtils
    • Moved me.lokka30.microlib.MicroLogger
    • Moved me.lokka30.microlib.items.ItemBuilder
    • Moved me.lokka30.microlib.maths.QuickTimer
    • Moved me.lokka30.microlib.other.UpdateChecker
    • Moved me.lokka30.microlib.other.VersionUtils
    • Moved me.lokka30.microlib.wholes.WholeSound
    • Moved me.lokka30.microlib.wholes.WholeTitle
    • Moved me.lokka30.microlib.files.YamlConfigFile
  • Events!
    • Removed PlayerMoveEventUtils, replaced by two new events, see below.
    • Added PlayerMoveFullXYZEvent, derived from PlayerMoveEvent. Only fires when a player moves to a different X, Y or Z coordinate as an integer (e.g. 1 to 2 yes, 1.9 to 2.0 yes, not 1.8 to 1.9 or 1.0 to 1.9)
    • Added PlayerMoveXYZEvent, derived from PlayerMoveEvent. Only fires when a player moves on the X, Y or Z axis in any amount. Head rotations do not fire this event.
    • These events are only fired if MicroLib is installed as a plugin. If it is shaded into your plugin then these events will not fire.
    • These events have not been tested. If you are using one or both of these events then please let me know how it goes. :)
Note
  • I would not recommend using ItemBuilder at the moment, it seems to be quite broken. I will fix it in the future, but it is very low on my priorities.
----------, Aug 16, 2021

MicroLib v2.4.0

Please read before using:
  • Developers: please ensure you don't skip past the bold 'IMPORTANT' lines in the changelog. There are only 2.
  • This version has not been tested. Please let me know if you have any issues with it and I will attempt to address it as soon as possible.

Changelog:
  • Maths Classes:
    • Added Randoms class:
      • Contains a bunch of methods based on ThreadLocalRandom, such as 'generate random int' and 'chance' to make it easier to program chances into your plugins.
    • Direction Utilities:
      • IMPORTANT Removed DirectionUtils class - replaced with 3 new enums, as stated below.
      • Added Direction4, Direction8, and the Direction16 classes. See its source code to learn more.
  • IMPORTANT Moved MicroLib main class into subpackage plugin. This will only affect you if you are not using Maven/Gradle. Just update your import and it's sorted :)
  • Minor improvements to MicroLogger:
    • Better method for checking if Spigot is installed.
    • Added stumper66 to authors of class.
  • Code cleanup in the Update Checker.
  • Improved javadocs in many places.
  • Added copyright notice above all MicroLib classes.
  • Maven (pom.xml) changes:
    • Updated annotations to 21.0.1.
    • Updated spigot-api to 1.17.1.
  • Updated website in plugin.yml to remove versioning from link.
----------, Aug 4, 2021

MicroLib v2.3.1
  • PenalBuffalo/stumper66 added color compatibility for spigot servers in the MicroLogger class.
----------, Jul 13, 2021

MicroLib v2.3.0
  • @stumper66 & @lokka30 fixed CraftBukkit incompatibility
  • @stumper66 added 'Is1.17' and 'Is1.18' methods to the VersionUtils class
  • @lokka30 added Spigot software checking to VersionUtils class
  • @lokka30 added a Direction class which can be useful when using directions
  • @stumper66 updated dependencies in pom (spigot-api)
  • @lokka30 removed .idea directory from repo
----------, Jun 27, 2021

v2.2.3
Notes:
  • This version has been tested: the only changes this update were to the ItemBuilder class.
  • Developers, please note:
    • The deprecated MicroUtils class will be removed in the next major MicroLib update. Please switch to ** MessageUtils#colorizeAll** as soon as possible. You have had a long notice :)
    • Are you using the ItemBuilder class? If so, the constructors using displaynames have been removed in this update. Please use ItemBuilder#withDisplayName instead. Contact me if you have any questions or troubles :)

Changelog:
  • Fixed ItemBuilder item meta issue.
  • Improved ItemBuilder code.
----------, Apr 7, 2021

v2.2.1
Notes:
  • This version has not been tested. (Only the ItemBuilder class was affected.)
  • Developers, the deprecated MicroUtils class will be removed in the next MicroLib update. Please switch to MessageUtils#colorizeAll as soon as possible. You have had a long notice to get updated! :)

Changelog
  • Attempted fix for ItemBuilder's item meta systems not working properly
  • Small improvements to ItemBuilder
----------, Apr 7, 2021

v2.2.0
Notes:
  • Developers, MicroUtils#colorize is now deprecated and you should use MessageUtils#colorizeAll instead.
  • This update was tested.

Changes:
New Classes
  • MessageUtils.java
    • This is a replacement to MicroUtils#colorize, allowing developers to translate standard color codes, hex color codes (if supported), and both at once!
    • All plugins using MicroUtils' colorize method will automatically redirect to the colorizeAll method! (Developers, please switch anyways - MicroUtils is deprecated now!)
    • Thanks to @Elementeral and @imDaniX for providing the code for hex code translation in this thread!
  • VersionUtils.java
    • This allows developers to check what major Minecraft version a server is running.
    • Contains simple methods such as isOneSixteen() and more complex (calculations-wise) , getMajorMinecraftVersion().
    • This covers all major Minecraft versions (1.6 to 1.16, and future versions will come).

Upgraded Classes
  • QuickTimer.java
    • Now uses far simpler code, and also allows developers to specify a starting time.

Removed / Deprecated Classes
  • MicroUtils.java
    • The features of MicroUtils.java have been moved to and been expanded upon in MessageUtils.java.

Insignificant Improvements

  • ItemBuilder.java: added final modifiers on two lists
  • Added method isInstalledAsPlugin to MicroLib.java.
  • Replaced unnecessary suppressions in MicroLogger.java and also instead utilising new MessageUtils.java class.
  • Better YAML structure in inbuilt plugin.yml.
  • Upgraded severity of update check failure from warning to severe in UpdateChecker.java.
  • Replaced Objects#requireNonNull(object) in WholeSound.java to assert object != null.
  • Replaced internal colorize method in WholeTitle.java (unsure why it still remained), now using new MessageUtils.java class.
  • Improved javadocs in most classes.
  • Now compiled with MC 1.16.5 instead of MC 1.16.3

If you like this update, feel free to leave a like or positive review :) Thank you all!
----------, Feb 27, 2021

v2.1.1
  • Fixed UpdateChecker#getLatestVersion's visibility (private -> public).
----------, Nov 14, 2020

v2.1.0
  • IMPORTANT: Removed old UpdateChecker#getLatestVersion method.
  • IMPORTANT: Renamed old UpdateChecker#retrieveLatestVersion method to UpdateChecker#getLatestVersion
  • Added the YamlConfigFile class for easier YAML config file management
  • Added the QuickTimer class for easy timing with no repeating tasks. Useful for timing start-up and shut-down times, etc.
  • Code improvements.
----------, Nov 14, 2020

v2.0.0
Server owners, you must read the entire changelog (except for the all changes section at the bottom). Major changes have occured with the resource, and if you are unfamiliar with them, then there is a pretty high chance that you will start experiencing errors.

  • MicroLib is now designed to be moreso shaded into plugins rather than be a plugin in the plugins folder.
    • This means that resources don't have to force you to install MicroLib in the plugins folder anymore, since it can be silently included inside the plugin jar.
    • Of course, if the developer uses MicroLib's methods but doesn't want to shade it in to their resource, the server owner will need to put MicroLib in their plugins folder.
  • All plugin-like functionality from MicroLib has been completely removed. There are no commands, events, anything, just the code sitting there waiting to be utilised by other plugins. You won't even notice it's installed.
  • MAKE SURE:
    • Do not use MicroLib v1 plugins with MicroLib v2 installed. Do not use MicroLib v2 plugins with MicroLib v1 installed. Significant changes have occured in the code which causes this
All changes (Server owners, you don't have to read this section)
  • Major changes:
    • Removed listeners and events from the resource. You can now use PlayerMoveEventUtils' static methods to achieve the exact same functionality and ease of use.
    • Removed the contents of the MicroLib class as they are no longer required.
  • Minute changes:
    • ItemBuilder
    • UpdateChecker
    • WholeSound
    • WholeTitle
  • Other things:
    • Removed bStats as it is not suitable for this resource anymore.
----------, Oct 2, 2020

v1.0.9
  • Removed unused message from messages.yml (no file update is required, file version unchanged)
  • Added functionality to /microlib reload.
  • Versioning changed again, removed build number. Also, ML is no longer in alpha.
----------, Sep 27, 2020

v1.0.8-ALPHA b8
  • Important Information
    • messages.yml updated to version 3. Reset or merge your current file with a newly generated file.
    • This release was not tested.
  • Added customisable main command message to messages.yml.
  • Added setFrom and setTo to movement events.
  • Modified startup banner.
  • Removed disable banner.
  • Various minor changes.
----------, Sep 23, 2020

v1.0.7-ALPHA
  • Update checker now available
  • Changed logging method in UpdateChecker
  • Updated README.md (Spigot link added)
----------, Sep 19, 2020

v1.0.6-ALPHA
  • Code Cleanup
----------, Sep 19, 2020

Resource Information
Author:
----------
Total Downloads: 1,897
First Release: Sep 19, 2020
Last Update: Apr 2, 2022
Category: ---------------
All-Time Rating:
3 ratings
Find more info at github.com...
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings