-
-
Notifications
You must be signed in to change notification settings - Fork 7
Home
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 validation of files required by Spigot during compilation through the three little plugins. Further more, Karus Commons offers an annotation library with annotation processors for compile-time checks.
In an attempt to reduce the maintenance burden and increase compatibility across several 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.
Here for the impatient and the new, a brief summary of the features offered by the Karus Commons project is provided.
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.
The commons library offers a wide range of features from animations to localisation. Here again, for the impatient and the uninitiated, we provide a rundown of the offered features.
-
Animation: Less hassle for animating all kinds of bars from
ActionBar
s toTitleBar
s 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. To answer the frequent question, no, the development team will not "just use ACF and be done with it".
- Configuration: Yet another assortment of
ConfigurationSection
related utilities. -
Effects: Asynchronous particle rendering derived from EffectLib which does not rely on either NMS or CraftBukkit. According to our calculations, we have proven the following calculations to be true;
Less calculations on main thread = better TPS = happier players
-
Graphics: Facilities for the development of
Inventory
GUIs without the lost of one's sanity. IncludesInventory
regions and buttons for better structured code. -
Item: Builders for
ItemStack
s and each of the various types of ItemMeta to prevent the addition of invalid data and blowing an entire foot off. -
Localisation: Extends the Java localisation library to retrieve
ResourceBundle
s spread across several locations which may even be embedded or remote. Facilities for detection of thePlayer
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.
- Nullability: Facilities for one-line
- World: An assortment of vector manipulation utilities and dynamically updated locations.
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.