Skip to content

Quick start

CbeJl_Tpycbl edited this page Mar 14, 2025 · 1 revision

Setup yor project

This is not a guide for creating a plugin. See here -> Paper Project Setup

Add dependency

Before starting, you must add an API dependency to your plugin.

Download release and add local dependency in pom.xml file.

<dependency>
    <groupId>cbejl.plugins</groupId>
    <artifactId>CbeJlPotionsAPI</artifactId>
    <version>1.2</version> <!-- Change version on what you need -->
    <scope>system</scope>
    <systemPath>${project.basedir}/src/main/resources/CbeJlPotionsAPI-1.2.jar</systemPath> <!-- Change path on what you need -->
</dependency>

(in <dependencies> element)

Also add a dependency for your plugin.yml file

depend: [CbeJlPotionsAPI]

Good job!

Create custom effect type

Create class which CustomEffectType.class implementation and implement all abstract methods.

You also can owerride default methods, if you need that.

All fields have documentation, but if you can't read the javadoc, we have a separate wiki page.

examples

Nice!

Register your effect

Your effect created! But don't exist for minecraft :(

In order for him to begin his mortal existence, he must be registered by call CustomEffectManager.registerPotionEffectType(CustomPotionEffectType yourCustomPotionEffectType)

Just add that method in onEnable()

Cool!

The curse of coder

Now run test server with your plugin (and CbeJlPotionsAPI plugin), brew your potion, and test it!

Something wrong? Fix it!

Something wrong in CbeJlPotionsAPI? Go here!

Clone this wiki locally