nekto909

Плагин должен добавить копье бога, которое становится оружием игрока при попадании в него на 6 секунд, а когда игрок делает выпад, создаются частицы и воспроизводится звук.

Kodari AI
KodariMay 3 at 4:14 pm 7,370 (v2)

I’ll create a plugin that adds a mythical God’s Spear with binding mechanics and lunge abilities.

GodsSpear
A mythical weapon plugin that adds the God's Spear. When a player is struck by the spear, it becomes bound to them for 6 seconds. While wielding this divine weapon, players can perform powerful lunge attacks that create spectacular particle effects and dramatic sound effects. Features customizable particle types, sound effects, and binding duration through configuration.

I’ll create a complete God’s Spear plugin with hit-binding mechanics, lunge abilities, particles, and sounds.


God’s Spear plugin created successfully!

Key features:

  • Custom God’s Spear item with divine appearance

  • When a player hits another with the spear, it binds to the victim for 6 seconds and gives them a spear

  • Bound players can right-click to perform a powerful lunge with particles (FLAME) and sound (ENDER_DRAGON_FLAP)

  • Configurable bind duration, lunge power, cooldown, particles, and sounds

  • /godsspear command to obtain the weapon

  • Full cross-version compatibility via XSeries

All mechanics, timings, particles, and sounds are fully customizable in config.yml.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
7 413
src/main/java/com/godsspear/GodsSpear.java
package com.godsspear;

import com.godsspear.listener.SpearListener;
import com.godsspear.manager.SpearManager;
import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class GodsSpear extends JavaPlugin {
    
    private SpearManager spearManager;
    
    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        this.spearManager = new SpearManager(this);
        
        getServer().getPluginManager().registerEvents(new SpearListener(this), this);
        
        getCommand("godsspear").setExecutor(new SpearCommand(this));
        
        getLogger().info("God's Spear plugin has been enabled!");
    }
    
    @Override
    public void onDisable() {
        spearManager.cleanup();
        getLogger().info("God's Spear plugin has been disabled!");
    }
}