Create you own potion effect!
- paper-api version: 1.21.1
Supports drinkable, splash and lingering potions. And tipped arrows!
Add an API dependency to your plugin. Download release and add local dependency
<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>Create class which CustomEffectType.class implementation and implement all abstract methods.
After create your own effect type, simply register the type using the CustomEffectManager.registerPotionEffectType(CustomPotionEffectType type)
If you want to get a potion item with your custom effect, you can call the CustomEffectManager.getPotion(org.bukkit.NamespacedKey, CustomEffectProperties properties) or .getSplashPotion(...) or .getLingeringPotion(...)method.
If you want to get a tipped arrow with your custom effect, you can call the CustomEffectManager.getTippedArrow(org.bukkit.NamespacedKey, CustomEffectProperties properties) method.
Plugin based on CustomPotionAPI by Sheepion