CrucialLib is a shared library plugin -- it must be installed on your server for any plugin that depends on it to work.
- Spigot or Paper server version 1.21 or higher
- Java 21 or higher
- Download the latest CrucialLib jar from Releases
- Place the jar in your server's
plugins/folder - Restart the server
CrucialLib will create a plugins/CrucialLib/ folder with a config.yml on first startup. No manual configuration is needed.
After starting the server, you should see:
CrucialLib is now enabled (Version: 3.0.1) made by [ChafficPlugins].
You can also check with /plugins -- CrucialLib should appear in green.
CrucialLib is distributed via JitPack. You need to add the JitPack repository and the CrucialLib dependency to your build tool, then declare CrucialLib as a plugin dependency.
Add the JitPack repository to your pom.xml:
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>Then add the dependency with provided scope (CrucialLib is supplied by the server at runtime):
<dependency>
<groupId>com.github.ChafficPlugins</groupId>
<artifactId>CrucialLib</artifactId>
<version>v3.0.1</version>
<scope>provided</scope>
</dependency>repositories {
maven { url 'https://jitpack.io' }
}
dependencies {
compileOnly 'com.github.ChafficPlugins:CrucialLib:v3.0.1'
}repositories {
maven("https://jitpack.io")
}
dependencies {
compileOnly("com.github.ChafficPlugins:CrucialLib:v3.0.1")
}Add CrucialLib as a dependency in your plugin.yml so the server loads it before your plugin:
name: MyPlugin
version: 1.0.0
main: com.example.myplugin.Main
depend: [CrucialLib]If CrucialLib is optional for your plugin, use softdepend instead:
softdepend: [CrucialLib]All CrucialLib classes are under the io.github.chafficui.CrucialLib package:
import io.github.chafficui.CrucialLib.Utils.customItems.CrucialItem;
import io.github.chafficui.CrucialLib.Utils.customItems.CrucialHead;
import io.github.chafficui.CrucialLib.Utils.customItems.Stack;
import io.github.chafficui.CrucialLib.Utils.player.inventory.Page;
import io.github.chafficui.CrucialLib.Utils.player.inventory.InventoryItem;
import io.github.chafficui.CrucialLib.Utils.player.inventory.InventoryClick;
import io.github.chafficui.CrucialLib.Utils.player.inventory.prefabs.TogglePrefab;
import io.github.chafficui.CrucialLib.Utils.player.inventory.prefabs.YesNoButtonsPrefab;
import io.github.chafficui.CrucialLib.Utils.localization.LocalizedFromYaml;
import io.github.chafficui.CrucialLib.Utils.localization.Localizer;
import io.github.chafficui.CrucialLib.Utils.Server;
import io.github.chafficui.CrucialLib.Utils.Stats;
import io.github.chafficui.CrucialLib.Utils.api.Bossbar;
import io.github.chafficui.CrucialLib.Utils.api.Updater;
import io.github.chafficui.CrucialLib.Utils.player.effects.Interface;
import io.github.chafficui.CrucialLib.Utils.player.effects.VisualEffects;
import io.github.chafficui.CrucialLib.io.Json;
import io.github.chafficui.CrucialLib.io.Yaml;See the API Guide for code examples covering all CrucialLib features.