Repository navigation
Releases: SQD-Studios/sqd-lib
Release list
4.0.0 - Big changes and more platforms
For Administrators
If you have a plugin that clearly states you need to have SQDLib installed for it to work, where can you download
it? Well, you can get it from either Modrinth (Not yet approved)
or GitHub Releases. Warning, though: because SQDLib changes a lot, very
fast
that can do it that 1 version works while the other just breaks all the plugins which may use an older or newer version
of SQDLib.
For Developers
Version 4.0.0 adds the following platforms:
- Bungee
- Spigot
(After this I will probably not release major releases this frequently because I don't have as many platforms to implement)
Also, of course, the Spigot and Bungee versions will be limited a lot, and don't expect any Adventure stuff to work on there. It's mostly there just to chill out. The only reason to use the Spigot version is that it has a small inventory library, but it doesn't even have the NoteMaker because I couldn't find a way to edit an item's PDC
Fabric and Velocity changes
The configuration system is now on another dependency, which it now gives you as an API, so that means you'll need to change the packages:
net.chamosmp.sqdlib.<platform>.configtocom.sqdstudios.bukkit.configuration
Spigot and Paper features
Spigot and Paper also now have small economy utilities for Vault with NaN and other checks to make sure that sneaky transaction didn't give you NaN amount of money (Which NaN amount of money is a lot btw)
Core Changes
Who would like some new useless annotation? Me, me! We added a Requires annotation which shows what things a class, package, etc. needs to be used
We also added a Random class whose only function is to choose a random T from a list of Ts and their chances
There might be more changes, but have fun developing, my friends!
Migrating to v4
You'll first need to replace every instance of net.chamosmp with com.sqdstudios (And in the dependency too)
If you're migrating from even older versions like v2, you should delete the packages that are not found and make your
IDE suggest them to you because they're undocumented
Using SQDLib
Bundling (Recommended)
Adding the repository
repositories {
maven {
name = "chamosmpRepoReleases"
url = uri("https://maven.chamosmp.net/releases")
}
}Adding the dependency (Plugin)
plugins {
// Adding the shadow plugin
id("com.gradleup.shadow") version "9.6.1"
}
dependencies {
// You can replace "paper" with the following platforms:
// velocity, bungee, spigot
implementation("com.sqdstudios.sqdlib:sqdlib-paper:4.0.0")
}
tasks {
// The shadowJar configuration
shadowJar {
configurations = project.configurations.runtimeClasspath.map { setOf(it) }
relocate("com.sqdstudios.sqdlib", "(your plugin group).libs.sqdlib")
}
}Adding the dependency (Mod)
dependencies {
include(implementation("com.sqdstudios.sqdlib:sqdlib-fabric:4.0.0")!!)
}Mod/Plugin Dependency (Not Recommended)
Adding the repository
repositories {
maven {
name = "chamosmpRepoReleases"
url = uri("https://maven.chamosmp.net/releases")
}
}Adding the dependency (Plugin)
When using a paper-plugin.yml, make sure you have join-classpath: true when using this, or else you'll get class not
found exceptions
dependencies {
// You can replace "paper" with the following platforms:
// velocity, bungee, spigot
compileOnly("com.sqdstudios.sqdlib:sqdlib-paper:4.0.0")
}Adding the dependency (Mod)
dependencies {
compileOnly("com.sqdstudios.sqdlib:sqdlib-fabric:4.0.0")
}Full Changelog: v3.2.0...4.0.0
v3.2.0 - External dependency support
What's Changed?
Paper
You can now do some economy stuff with Vault and provide some safety checks to stop exploits (NaN abuse, etc.)
Paper, Velocity
Paper and Velocity SQDLib now have separate jars you can depend on, so you don't have to shadow it into your plugin. Of course, that comes with the downside that you can't mix versions of SQDLib with plugins and thus from package changes to break the whole plugin.
Full Changelog: v3.1.1...v3.2.0
Using as an administrator
If you have a plugin which clearly states you need to have SQDLib installed for it to work, where can you download
it? Well, you can get it from either Modrinth (Not yet approved)
or GitHub Releases. Warning, though: because SQDLib changes a lot, very
fast
that can do it that 1 version works while the other just breaks all the plugins which may use an older or newer version
of SQDLib.
Developing with SQDLib 3.2.0
Bundling (Recommended)
Adding the repository
repositories {
maven {
name = "chamosmpRepoReleases"
url = uri("https://maven.chamosmp.net/releases")
}
}Adding the dependency (Plugin)
plugins {
// Adding the shadow plugin
id("com.gradleup.shadow") version "9.6.1"
}
dependencies {
// Replace 3.2.0-BETA with the latest version, and you can replace paper with velocity
implementation("net.chamosmp.sqdlib:sqdlib-paper:3.2.0-BETA")
}
tasks {
// The shadowJar configuration
shadowJar {
configurations = project.configurations.runtimeClasspath.map { setOf(it) }
relocate("net.chamosmp.sqdlib", "(your plugin group).libs.sqdlib")
}
}Adding the dependency (Mod)
dependencies {
// Replace 3.2.0-BETA with the latest version
implementation("net.chamosmp.sqdlib:sqdlib-fabric:3.2.0-BETA")
}Mod/Plugin Dependency (Not Recommended)
Adding the repository
repositories {
maven {
name = "chamosmpRepoReleases"
url = uri("https://maven.chamosmp.net/releases")
}
}Adding the dependency (Plugin)
When using a paper-plugin.yml, make sure you have join-classpath: true when using this, or else you'll get class not
found exceptions
dependencies {
// Replace 3.2.0-BETA with the latest version, and you can replace paper with velocity
compileOnly("net.chamosmp.sqdlib:sqdlib-paper:3.2.0-BETA")
}Adding the dependency (Mod)
dependencies {
// Replace 3.2.0-BETA with the latest version
compileOnly("net.chamosmp.sqdlib:sqdlib-fabric:3.2.0-BETA")
}v3.1.1
Make the SlotType interface not sealed in paper
Full Changelog: v3.1.0...v3.1.1
v3.1.0 - Small paper (hopefully good) utilities
For fabric users
If you're a user of a fabric mod that needs this, you can download it from the assets. I'm looking to add it to Modrinth soon
For Developers
Things to look out for
This version changes some packages, so don't worry if you get errors! You should just delete the imports and let it auto-complete them for you.
Velocity
Make it not experimental
Fabric
You can now use the logger without needing to initiate it, and you can use MiniMessage in it now. Yayy!
Paper
Paper now has some new utilities which may be useful:
- NoteMaker
- Create notes more easily. If you don't know what notes are, see this
- chamogui
- A small GUI library based on the Bukkit inventory system instead of MenuType. I don't really recommend trying this while it is undocumented. An example of this being used can be found in ChamoItemSkins
- DebugLogger
- A logger which only logs if debug is enabled (Which it finds through the config (the key is
debug: true))
- A logger which only logs if debug is enabled (Which it finds through the config (the key is
This should be it for Paper. I also have planned something for more advanced dialogs, so stay tuned
Core
Make the annotation retention from runtime to source
Using SQD Lib 3.1.0
Adding the repository
repositories {
maven {
name = "chamosmpRepoReleases"
url = uri("https://maven.chamosmp.net/releases")
}
}Adding the dependency (Plugin)
plugins {
// Adding the shadow plugin
id("com.gradleup.shadow") version "9.6.1"
}
dependencies {
// Replace paper with your plugin platform (Available platforms: paper, velocity)
implementation("net.chamosmp.sqdlib:sqdlib-paper:3.1.0")
}
tasks {
// The shadowJar configuration
shadowJar {
configurations = project.configurations.runtimeClasspath.map { setOf(it) }
relocate("net.chamosmp.sqdlib", "(your plugin group).libs.sqdlib")
}
}Adding the dependency (Mod)
dependencies {
// You can also change this into compileOnly if you want your users to use the standalone mod
implementation("net.chamosmp.sqdlib:sqdlib-fabric:3.1.0")
}Full Changelog: v3.0.0...v3.1.0
v3.0.0 - Fabric support and more!
This release brings a lot of new stuff, and probably some questionable choices...
Small Stuff
DoubleValueListnow implementsList, allowing you to use it like a normal list (Why didn't I think of that)- Switch from JetBrains annotations to JSpecify
- Color Annotations (Supports MiniMessage, Supports Color Systems)
- Better Javadocs
- Change how
LanguageUtilgets the messages
Big Velocity Changes
We expect you to now extend your main class to VelocityPlugin, so we can use some of its features like:
- Getting the plugin container
- Getting resources
- Saving, reloading, and getting configs
- Getting the ProxyServer
- Getting the class loader
- More
You'll also need to pass some arguments to VelocityPlugin to be used correctly. The result may look something like this:
@Inject
public TestPlugin(ProxyServer server, @DataDirectory Path configDir) {
super(server, configDir);
}Reminder: to change your proxy initialize method's signature to: onProxyInitialize(ProxyInitializeEvent event), and add the override annotation
ConfigUtil was migrated to Velocity, and its dependent LanguageUtil, so you can now do that as well. If you have noticed the config system looks a lot like the Bukkit one, and if you said that, you're right. This version also adds the Bukkit Configuration system to Velocity because Configurate is kinda a pain to use.
Fabric Support
You need to be developing for 26.2 for SQDLib to work on Fabric
We added Fabric Support, but it doesn't do much because the Fabric API is limiting. Now, instead of implementing ModInitializer, you should extend FabricMod, which adds more to work with, similar to Velocity. The Fabric library also implements the Bukkit configuration system. An example main class is:
import net.chamosmp.sqdlib.fabric.FabricMod;
public class MyMod extends FabricMod {
public MyMod() {
super("my-mod-id");
}
@Override
public void onInitialize() {
// noinspection all
new LoggerUtil("MyMod ");
// Doing stuff
}
}The Fabric library also provides these 2 APIs for you:
snakeyamladventure-platform-fabric
Paper Changes
The paper side hasn't really had any changes, but we've planned some stuff which will come pretty soon
Using version 3.0.0
Adding the repository
repositories {
maven {
name = "chamosmpRepoReleases"
url = uri("https://maven.chamosmp.net/releases")
}
}Adding the dependency (Plugin)
plugins {
// Adding the shadow plugin
id("com.gradleup.shadow") version "9.6.1"
}
dependencies {
// Replace paper with your platform (Platforms: paper, velocity)
implementation("net.chamosmp.sqdlib:sqdlib-paper:3.0.0")
}
tasks {
// The shadowJar configuration
shadowJar {
configurations = project.configurations.runtimeClasspath.map { setOf(it) }
relocate("net.chamosmp.sqdlib", "(your plugin group).libs.sqdlib")
}
}Adding the dependency (Mod)
dependencies {
implementation("net.chamosmp.sqdlib:sqdlib-fabric:3.0.0")
}Have fun developing!
Full Changelog: v2.1.3...v3.0.0
v2.1.2 - Bug fixes
Full Changelog: v2.1.1...v2.1.2
v2.1.1 - DoubleValueList
This is a small release that implements:
DoubleValueList
A list object that helps you get a list with only 1 of the arguments of the double value object it stores
Full Changelog: v2.1.0...v2.1.1
Lang features! (v2.1.0)
What's changed?
Lang (Language) features
The major point of this release (v2.1.0) is lang features (Trust me, there are a lot of lang features (Source: trust me, bro))
DoubleValue<T, E>
Double value acts as an object that holds 2 objects at once (Hope the GC likes it). This may be useful if you want to return 2 values at once (Instead of having to make a record). You can get a DoubleValue instance by doing: new DoubleValue<>(T, E). An example of how to use it is this:
public DoubleValue<String, String> getDoubleValue() {
String value1 = null;
String value2 = null;
return new DoubleValue<>(value1, value2);
}Annotations
Added a SupportsPlatforms(Platform) annotation, which allows you to indicate which platforms a method, class, or Package supports. It currently doesn't do a lot, as it doesn't give a warning or anything if the wrong code is used in the wrong places. That means the user currently needs to see the annotation and see if it corresponds to their platform (Which is very unlikely). It could be fixed by:
- Making a Gradle plugin
- Making an IntelliJ IDEA plugin
- Both
I was leading towards making a Gradle plugin, so users don't have to download an extension for the warnings to work directly. This still doesn't fix the issue directly, though.
Enums
Added a Platform enum with the following options:
- FOLIA
- PAPER
- SPIGOT
- BUKKIT
- VELOCITY
- BUNGEECORD
- ALL
You may see it's missing some forks, but how long is it going to be? If you want, create a PR adding a new one (Or an issue if you're lazy (Like me)).
Exceptions
Added a LoggerNotInitiatedBeforeUsing exception, which is thrown when the LoggerUtil class is used without it being initiated in the past. It also extends RuntimeException, so it will disable the plugin
Javadocs
Added detailed Javadocs for almost everything (Except internal and lang stuff). That also means that now the sources can be downloaded by your IDE, so you can see the Javadocs from inside there.
Small changes / Other Stuff
- Set source and target compatibility to Java 25
- The output JAR includes sources
- In
UpdateUtil, actually log a message if there is no update available, instead of logging nothing - In the paper version of
LoggerUtil, added the ability to initiate the class with the plugin instance (Instead of the prefix), and use the component logger (Instead of sending a message to the console command sender) - Make the velocity version of
SchedulerUtil#runAsyncObsolete, as all tasks in velocity are run async.
Full Changelog: v2.0.0...v2.1.0
Using v2.1.0
If you tried to use this near release (around the first 5 minutes mark) and it didn't work, the release workflow may not have finished or may not even have started, so we recommend always checking that before going to support.
Adding the repository
repositories {
maven {
name = "chamosmpRepoReleases"
url = uri("https://maven.chamosmp.net/releases")
}
}Adding the dependency
dependencies {
// Replace paper with your platform (Currently supported: velocity, paper)
implementation("net.chamosmp.sqdlib:sqdlib-paper:2.1.0")
}Relocating it
plugins {
// Adding the shadow plugin
id("com.gradleup.shadow") version "9.6.1"
}
tasks {
// The shadowJar configuration
shadowJar {
configurations = project.configurations.runtimeClasspath.map { setOf(it) }
relocate("net.chamosmp.sqdlib", "(your plugin group).libs.sqdlib")
}
}
And hey, it's done! You're now using version 2.1.0 of sqd-lib in your plugin
Thank you all contributors who helped make this version:
Quite lonely here
Velocity Support! (v2.0.0)
What's Changed
This release brings in Velocity support
This release changes the package of LoggerUtil.LogType and moves it into its own enum in net.chamosmp.sqdlib.util.LogType. Also, the dependency artifact names change from sqd-lib to sqdlib-(platform), with the available platforms being paper and velocity
Full Changelog: v1.1.3...v2.0.0
v1.1.3
Full Changelog: v1.1.2...v1.1.3
Adding the dependency
repositories {
maven {
name = "chamosmpRepoReleases"
url = uri("https://maven.chamosmp.net/releases")
}
}
dependencies {
implementation("net.chamosmp.sqdlib:sqd-lib:1.1.3") // Replace 1.1.3 with the latest version
}Relocating it
plugins {
id("com.gradleup.shadow") version "9.6.1" // Adding the shadow plugin
}
tasks {
shadowJar { // The shadowJar configuration
configurations = project.configurations.runtimeClasspath.map { setOf(it) }
relocate("net.chamosmp.sqdlib", "(your plugin group).libs")
}
}