MicroLib icon

MicroLib -----

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



ABOUT
MicroLib is a resource for developers - a library of Java code containing a bunch of useful methods and classes which will make plugin development faster, easier and cleaner.

In plugin form, MicroLib does not do anything on its own. It's designed to be embedded inside other plugins to enhance them. ;)

There are no repeating tasks, no commands, not even metrics... nothing but code for other plugins to utilise. :)


QUICK LINKS


INCLUDING ML
There are two ways to use it:
  • Shade Method (highly recommended)
    • MicroLib is shaded into your plugin using Maven/Gradle. Server owners don't need to install it as a plugin.
    • ++ This means server owners won't need to install MicroLib or even know it exists! Makes it very easy for your plugin's users.
    • ++ You can update MicroLib whenever you want since you will not have to force your users to update MicroLib since they don't even have it installed.
    • - Can't use MicroLib's Events code, if you're interested in those.
    • - Your plugin's file size will increase a tad. Few resources on the platform will actually need to consider this.
    • - This method requires Maven/Gradle, although you should definitely look into switching to either of them!
    • This method is great for all use cases, especially for public plugins.
  • Dependency Method (not recommended)
    • Server owners install MicroLib into their plugins folder. It's not shaded into your plugin.
    • -- Your plugin's users have to install another plugin to make your plugin work. Many users don't read, it's a weird phenomenon.
    • -- They also have to update it alongside when you update the MicroLib version your plugin depends on, else errors could occur.
    • + You can use MicroLib's Events code.
    • + Lower file size for the plugin utilising it. Again, this benefits few plugins on the platform.
    • + This method doesn't require Maven/Gradle, although you should definitely look into switching to either of them!
    • This method is great for private-use plugins where you have full control over the environment operating it, e.g., a plugin for your Survival server. It is only useful if you want to use the Events code, otherwise you should really use the Shade method.

This library will run on any Minecraft version that isn't prehistoric. If you're unsure, just test it. :)


FEATURES
  • Doesn't do any stupid things in the background to slow down your server. Just sits there and does what other plugins want it to do!
  • Open-source
  • Lightweight
  • Javadocs included
  • Events
    • PlayerMoveFullXYZEvent and PlayerMoveXYZEvent are two events which MicroLib calls if MicroLib is loaded as a plugin in the plugins folder (not shaded). If you are running quite heavy code with PlayerMoveEvent, you should definitely switch to PlayerMoveXYZEvent or even PlayerMoveFullXYZEvent as these are called far less than PlayerMoveEvent is.
  • Exceptions
    • OutdatedServerVersionException
      • You can fire this exception when your code requires a newer Minecraft server version to run (e.g. new 1.17 features).
  • Files
    • YamlConfigFile
      • Just a standard Bukkit config wrapper that makes it a bit easier to work with configs.
  • Items
    • ItemBuilder
      • Yet another Item Builder class! Create ItemStacks with ease, one line and you've got a fully formatted ItemStack! :)
  • Maths
    • Directions
      • Comes in 3 types - 4, 8 and 16 - these types allow you to choose accuracy (and difficulty of use). Convert a Location's pitch into a direction! Uses Minecraft pitch values of course.
    • QuickTimer
      • Ever needed to time something in a simple fashion, like how long it takes to start up a plugin? Use QuickTimer.
    • Randoms
      • A bunch of methods that generate random numbers and also a chance method.
  • Messaging
    • MessageUtils
      • Colorize the world!
      • Even translates Hex color codes (&#ABCDEF) if the server is 1.16 or newer! (Don't worry, it doesn't self destruct when an older version is used)
    • MultiMessage
      • This class makes it so much easier to send messages to players that are multi-lined, have any amount of placeholders (especially multiple of them), and are colorized automatically.
  • Other
    • UpdateChecker
      • Asynchronously get the latest version from your plugin's SpigotMC page!
      • A very slightly modified version of the class on this wiki page.
    • VersionUtils
      • Check what version a server is running! Achieved by checking what blocks exist on the server from the various updates across the years.
      • You can also check if a server is running Spigot (or any Spigot derivative) and also Paper (or any Paper derivative)!
  • Wholes
    • Wholes are just wrappers to send things to players, such as sounds or titles, containing all the information and ready to go. They have a bunch of different methods that make it easier to send it to individuals and groups of players.
    • WholeSound
    • WholeTitle


TECHNICAL SUPPORT
[​IMG]
I only provide technical support on the ArcanePlugins Discord Server.
Please ensure that you have read the documentation before asking for help.



CREDITS
Maintainers:

Contributors:


LICENSE
Licensed under the MIT License. By using MicroLib, you agree to the license.


REVIEWS
I really appreciate feedback and criticism so I know if MicroLib is heading in the right direction.
However, do not use the reviews section as means to get support. There's a discord server for that! :)

lokka30, plugins, spigotmc, spigot, papermc, paper, plugin, plugins, minecraft, minecraft plugin, minecraft plugins, spigot plugin, spigot plugins
library, api, minecraft library, spigot lib, lib, bukkit
microlib, micro lib, microlib spigot, micro lib spigot
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