Your cart is empty
Looks like the spiders padded through here. Pick a plugin and it will show up here. Continue shoppingAdd the Phoenix Crates API to your project and build add-ons and custom animations.
The API is only available for the premium version of the plugin.
Build your own extensions for Phoenix Crates with our public API. Events and Examples have their own pages.
<repositories>
<repository>
<id>phoenixplugins</id>
<url>https://repo.phoenixplugins.com/</url>
</repository>
</repositories>
<dependency>
<groupId>com.phoenixplugins.phoenixcrates</groupId>
<artifactId>api</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
Our public API covers the recommended integration points for addons.
If you need deeper access to internal classes and systems, we recommend using a direct systemPath dependency to your local Phoenix Crates plugin JAR.
<dependency>
<groupId>com.phoenixplugins.phoenixcrates</groupId>
<artifactId>internal</artifactId>
<version>1.0.0-SNAPSHOT</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/PhoenixCrates-1.0.0-SNAPSHOT.jar</systemPath>
</dependency>
Place the plugin JAR in your project's libs folder before building.
Custom Addons are extensions that allow you to extend, modify, or enhance Phoenix Crates behavior with your own Java code.
Create an addon.yml file in your project's resources folder.
name: AddonName
main: your.path.AddonExample
author: [YourName]
version: 1.0.0
description: Small description (optional)
website: https://your-website.com (optional)
Required fields:
name: Display name of your addon.main: Fully qualified path to your addon main class.author: One or more addon authors.version: Addon version.The main value in addon.yml must point to your class that extends Addon.
package your.path;
import com.phoenixplugins.phoenixcrates.api.sdk.plugin.addons.Addon;
public class AddonExample extends Addon {
@Override
public void onLoad() {
// Called when the addon is loaded.
}
@Override
public void onEnable() {
// Register listeners, commands, tasks, etc.
}
@Override
public void onDisable() {
// Cleanup logic.
}
@Override
public String getRequiredPluginVersion() {
return "5.0.0";
}
}
plugins/PhoenixCrates/addons.Create your own opening phase animations and register them at runtime through the API.
Extend OpeningPhaseAnimation and implement the lifecycle methods:
public class YourPhaseAnimation extends OpeningPhaseAnimation<EmptyOpeningPhaseData> {
public YourPhaseAnimation(OpeningCrateAnimation animation, OpeningPhaseType type,
EmptyOpeningPhaseData data) {
super(animation, type, data);
}
@Override
public void load() {
}
@Override
public void tick() {
}
@Override
public void unload() {
}
}
Register your phase during addon startup and unregister it on shutdown:
public void onEnable() {
registerPhase(
new OpeningPhaseType(PhaseType.FIRST, "YOUR_PHASE_IDENTIFIER",
"Your Display Name",
XMaterial.STONE, ServerVersion.v1_16_R1,
new XMaterial[] {}, EmptyOpeningPhaseData.class,
(animation, type, data) -> new YourPhaseAnimation(animation,
type, (EmptyOpeningPhaseData) data),
() -> new EmptyOpeningPhaseData()));
}
public void onDisable() {
for (final OpeningPhaseType type : this.registeredPhases) {
OpeningPhaseType.unregisterPhase(type);
}
}
private void registerPhase(OpeningPhaseType phase) {
// Registering first phase animations
OpeningPhaseType.registerPhase(phase);
// Caching to unload later on
this.registeredPhases.add(phase);
}
tick() when possible.onDisable().
Your cart is empty
Looks like the spiders padded through here. Pick a plugin and it will show up here. Continue shopping