Skip to content
Matthias Ngeo edited this page May 3, 2018 · 51 revisions

Karus Labs Logo

The Karus Commons project is a collection of open source libraries and tools which assist in the development of Spigot Plugins. Other than the Spigot-related utilities shipped with the commons library, Karus Commons provides automated generation and linting of files required by Spigot during compilation through the Maven Plugin Trinity. Further more, Karus Commons offers an annotation library with annotation processors for compile-time assertions.

To reduce the maintenance burden and increase compatibility across Spigot versions, the development team has reached the consensus to avoid the usage of CraftBukkit and NMS and rely solely on the API provided by Spigot. In addition, this project will always be built against the latest Spigot version.

Here, a brief summary of the features offered by the Karus Commons project is provided.

Annotations

The annotations library provides annotations and companion annotation which checks the annotated types at compile-time. Other than the aforementioned, the annotations library also provides annotations to better convey the author's intention.

Commons

The commons library offers a wide range of features from animations to localisation. Here again, we provide a rundown of the offered features.

  • Animation: Less hassle for animating all kinds of bars from ActionBars to TitleBars except for chocolate bars.
  • Collection: An assortment of niche collection classes that include type safe heterogenous containers and decorator collections.
  • Commands: An annotation and YAML hybrid command system with the best of both worlds that supports nested commands and localisation.
  • Configuration: Yet another assortment of ConfigurationSection related utilities.
  • Effects: Asynchronous particle rendering derived from EffectLib which relies on neither NMS nor CraftBukkit. Less calculations on main thread = better TPS = happier players
  • Graphics: Facilities for the development of Inventory GUIs without being driven insane. Includes Inventory regions and buttons for better structured code.
  • Item: Builders for ItemStacks and each ItemMeta.
  • Localisation: Extends the Java localisation library to retrieve ResourceBundles spread across several embedded or even remote locaations. Facilities for detecting a Player's locale is also provided.
  • Miscellaneous: Contains utilities which do not fit in anywhere.
    • Nullability: Facilities for one-line null checks and returning default values, and vice-versa.
    • Concurrency: Provides standard concurrency interfaces, i.e. Future for Bukkit scheduling related classes. Auto-closable locks and unchecked concurrency exceptions are also included.
    • Checked functions: Checked variants of the standard java.util.function interfaces and facilities to wrap the checked variants as its unchecked counterpart.
  • World: An assortment of vector manipulation utilities and dynamically updated locations.
The Maven Plugin Trinity

The Maven Plugin Trinity are Maven Plugins which provides the automated generation of the plugin.yml file and the subsequent checking of both the commands.yml and plugin.yml files. Each plugin is independent of the others and does not rely on the other two to function. It is however, recommended to use the three plugins in conjunction as each plugin complements the other two. A brief description of each plugin is provided.

  • Plugin-Annotations: Provides annotations from which the plugin.yml is generated, annotation values will default to those present in the project's pom.xml.
  • Plugin.yml Lint: Checks the plugin.yml at compile-time which allows errors to be caught in the earlier stages of development rather than at runtime.
  • Commands.yml Lint: Checks the commands.yml at compile-time which allows errors to be caught in the earlier stages of development rather than at runtime.
Clone this wiki locally