A library for Bukkit, Spigot, Paper and BungeeCord, that provides commonly used functions and provides cross version support for a lot of Minecraft features (some of which are no longer supported or support for them has been added later by Bukkit/Spigot/Paper).
- Config/Language file handler
- File upgrade support (copy old values in new file)
- Comment support
- UUID converter
- Supports Name -> UUID, UUID -> Name or UUID -> Name changes
- Supports online and offline mode UUIDs
- Batch converting and automatic batch size detection (in case Mojang decides to reduce the maximum batch size again)
- Caching
- If the lib is running as a Plugin the cache can be shared by all plugins using it
- Preloads UUIDs from the Minecraft servers UUID cache
- Auto-updater
- Supports multiple sites for checking and downloading of updates
- spigotmc.org (checking + downloading (free and hosted on spigotmc.org))
- dev.bukkit.org (checking + downloading)
- GitHub (checking + downloading)
- Jenkins build servers (checking + downloading)
- Static URL (downloading)
- Supports multiple sites for checking and downloading of updates
- JSON message handling
- Collections of useful functions
- Option to share database connection pool between multiple plugins
- Particles handler
- Item-Stack serializer
- Material name resolver
- Late registrable commands
- Marriage Master (V2.0 and newer)
- Minepacks (V2.0 and newer)
- Java 8 (or newer)
- Bukkit, Spigot, Paper, Uranium for MC 1.7 or newer or BungeeCord for MC 1.8 or newer
- (Optional) PlaceholderAPI (to use it with the provided message API)
The library can be added in two ways to your plugin.
- Requiring it to be installed as a plugin (will be published on dev.bukkit.org and spigotmc.org soon)
- Shading it into your plugin (requires more RAM and some features will not work)
<repository>
<id>pcgf-repo</id>
<url>https://repo.pcgamingfreaks.at/repository/maven-everything</url>
</repository>
<dependency>
<groupId>at.pcgamingfreaks</groupId>
<artifactId>PluginLib</artifactId>
<version>1.0.30-SNAPSHOT</version><!-- Check version shield for newest version -->
</dependency>
Add PCGF_PluginLib
as a dependency for your Bukkit/Spigot or BungeeCord plugin.
The users will have to install the library as a plugin. Download: https://ci.pcgamingfreaks.at/job/PluginLib/
By adding the library to your plugin through shading it will require more memory (if multiple plugins using the library are installed) and some features (DB connection sharing, translation sharing) will not be available. The recommended shading settings:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
<minimizeJar>false</minimizeJar><!-- Do not minimize or some of the utils will not work on Bukkit -->
<artifactSet>
<includes>
<include>at.pcgamingfreaks:PluginLib</include>
</includes>
</artifactSet>
<relocations>
<!-- Relocate the lib to prevent conflicts with other plugins using it -->
<relocation>
<pattern>at.pcgamingfreaks</pattern>
<shadedPattern>your_package.libs.at.pcgamingfreaks</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
</plugin>
Replace your_package
with the package of your plugin.
Do not shade this library into your plugin without relocation!!!
- Java JDK
- Min: 8
- Recommended: 17
- Acceleration for Minecraft 1.17 can only be built with Java >= 16
- Acceleration for Minecraft 1.18 can only be built with Java >= 17
- Maven >= 3.6.3
- git
git clone https://github.com/GeorgH93/PCGF_PluginLib
cd PCGF_PluginLib
mvn package
- Build Server
- Code Coverage
- Javadoc
- Spigot (TBA)
- Dev Bukkit (TBA)