pranab0352

Make a crystal plugin in which we have crystal like strength crystal speed crystal

Kodari AI
KodariOct 29 at 7:17 pm 6,167 (v2)

I’ll create a crystal effects plugin with different crystal types that grant potion effects.

CrystalEffects
A plugin that adds magical crystals granting temporary potion effects to players. Features include Strength Crystal, Speed Crystal, and other effect crystals. Players can use crystals by right-clicking them, with configurable durations, amplifiers, and cooldowns. Includes admin commands for giving crystals, custom item appearances with glowing effects, and full configuration support for creating unlimited crystal types.

Plugin created! Features include:

  • 6 Crystal Types: Strength, Speed, Regeneration, Resistance, Jump, Haste

  • Right-click to use with automatic consumption

  • Cooldown system prevents spam

  • Glowing effect on all crystals

  • Fully configurable - add unlimited crystal types via config.yml

  • Commands: /crystal give, /crystal list, /crystal reload

  • Creative mode doesn’t consume crystals

Build with gradle build and crystals will be in build/libs/.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
8 533
src/main/java/com/crystaleffects/CrystalEffects.java
package com.crystaleffects;

import org.bukkit.plugin.java.JavaPlugin;

public class CrystalEffects extends JavaPlugin {
    private static CrystalEffects instance;
    private CrystalManager crystalManager;
    
    @Override
    public void onEnable() {
        instance = this;
        
        saveDefaultConfig();
        
        this.crystalManager = new CrystalManager(this);
        crystalManager.loadCrystals();
        
        getServer().getPluginManager().registerEvents(new CrystalListener(this), this);
        
        getCommand("crystal").setExecutor(new CrystalCommand(this));
        
        getLogger().info("CrystalEffects has been enabled!");
    }
    
    @Override
    public void onDisable() {
        getLogger().info("CrystalEffects has been disabled!");
    }
    
    public static CrystalEffects getInstance() {
        return instance;
    }
    
    public CrystalManager getCrystalManager() {
        return crystalManager;
    }
}