-
Notifications
You must be signed in to change notification settings - Fork 2
Migrating to CodeLib 4
Julian Weinelt edited this page Jun 13, 2025
·
1 revision
CodeLib 4 brings some new features for your server. These include:
- CodeLib directly installed on your server
- Better instance management
- management for player's nicknames and their skins
- A full SQL-API
You have to do various changes on your code and references.
Now, CodeLib uses the dependency version 4.x:
<dependency>
<groupId>de.codeblocksmc.codelib</groupId>
<artifactId>CodeLib</artifactId>
<version>4.0.0</version>
</dependency>Important
In version 3, you didn't use any scope with Maven. As CodeLib 4 is directly installed on your server,
you **have to add **``provided` to the dependency:
<dependency>
<groupId>de.codeblocksmc.codelib</groupId>
<artifactId>CodeLib</artifactId>
<version>4.0.0</version>
<scope>provided</scope> <!-- 👈 Here: IMPORTANT -->
</dependency>For a better structure, all utility classes have been moved into packages. This works as the following:
| Class (< v3.4.x) | new package (v3.4.x) | new package (v4.x) |
|---|---|---|
| GuiBuilder | wrapping/GuiBuilder |
api/wrapping/GuiBuilder or api/wrapping/adventure/GuiBuilder
|
| ItemBuilder | wrapping/ItemBuilder |
api/wrapping/ItemBuilder or api/wrapping/adventure/ItemBuilder
|
| ItemWrapper | wrapping/ItemWrapper |
api/wrapping/ItemWrapper or api/wrapping/adventure/ItemWrapper
|
| EnchantmentWrapper | wrapping/EnchantmentWrapper |
api/wrapping/EnchantmentWrapper or api/wrapping/adventure/EnchantmentWrapper
|
| PotionEffectWrapper | wrapping/PotionEffectWrapper |
api/wrapping/PotionEffectWrapper or api/wrapping/adventure/PotionEffectWrapper
|
| SQL Templates | /database |
api/database/templates |
| Location Utilities | /locations |
api/locations |
| Misc utilities | /util |
api/util |