redz213

make a plugin that automatically turns strength 2 into 8 minute strength 2. make it turn speed 2 into 8 minute speed 2

Kodari AI
KodariJun 19 at 5:20 pm 2
PotionExtender
Automatically extends Strength II and Speed II potion effects to 8 minutes (9600 ticks) whenever a player receives them. Works passively in the background — no commands needed. When a player gains Strength II or Speed II from any source (potions, beacons, commands, etc.), the plugin instantly replaces the effect with an 8-minute duration version at the same amplifier.
redz213

remove the lore from the potions when converted

Kodari AI
KodariJun 19 at 5:23 pm 9

The current plugin only touches effects, not items. I’ll add a PlayerItemConsumeEvent listener that strips lore from the potion item right before it’s consumed, covering drinkable potions. For splash/lingering potions the item doesn’t get consumed by the thrower — I’ll handle those via ProjectileLaunchEvent on the player’s hand.

Two new event handlers added:

  • PlayerItemConsumeEvent — strips lore from drinkable Strength II / Speed II potions right before they’re consumed.

  • PlayerInteractEvent — does the same for splash and lingering potions when thrown.

Both check the base potion type and any custom effects, so it covers both vanilla-brewed and plugin-created potions.

Kodari can make mistakes. Review important code before using.
Files
src
Code
3 109
src/main/java/com/kodari/potionextender/PotionExtender.java
package com.kodari.potionextender;

import org.bukkit.plugin.java.JavaPlugin;

public class PotionExtender extends JavaPlugin {

    @Override
    public void onEnable() {
        getServer().getPluginManager().registerEvents(new EffectListener(), this);
    }
}