E

make that into plugin

Kodari AI
KodariMay 4 at 6:03 pm 15,858 (v2)

I’ll read all the existing files first to understand the current state and then create a complete working plugin.

I’ll fix the issues in the existing code to make it a complete, working plugin.

✓ Plugin is now complete and functional!

Fixed two critical issues:

  1. GoatCommand: Color codes in item display name and lore now properly translate

  2. GoatDamageListener: Updated shield damage handling to use modern Damageable API and proper sound effect

What this plugin does:

  • Players use /goat to receive a special goat spawn egg

  • Right-clicking the egg summons a giant screaming goat that falls from the sky (50 blocks up)

  • When the goat hits a player, it deals 12 damage, applies strong knockback, and can break shields

  • Includes configurable particles, sounds, cooldowns, and all goat behavior settings

  • Full permission system for command access and ability usage

The plugin is ready to compile with Maven (mvn clean package) and will work on Paper/Spigot 1.21+.

E

MAKE IT SO IT DOES AOE DAMAGE IN 10 BLOCKS RANGE

Kodari AI
KodariMay 4 at 6:05 pm 14,042 (v2)

✓ AOE damage implemented!

The goat ability now damages all players within 10 blocks of the goat when it hits:

Changes made:

  1. config.yml: Added aoe-range: 10.0 configuration option

  2. ConfigManager: Added getAoeRange() method to read the AOE range

  3. GoatDamageListener: Modified to find all players within range and apply damage, knockback, shield breaking, and effects to each one

How it works:

  • When the goat collides with any player, it triggers the damage event

  • The listener cancels the original damage and instead finds all players within 10 blocks

  • Each player in range receives the full damage (12.0), knockback (1.5), shield break, and impact effects

  • The AOE range is configurable in config.yml under goat.aoe-range

E

and make it so its spawns above of the user

Kodari can make mistakes. Review important code before using.
Files
src
pom.xml
README.md
Code
13 781
src/main/java/com/example/goatability/GoatAbility.java
package com.example.goatability;

import com.example.goatability.commands.GoatCommand;
import com.example.goatability.listeners.ItemUseListener;
import com.example.goatability.listeners.GoatDamageListener;
import com.example.goatability.managers.ConfigManager;
import org.bukkit.plugin.java.JavaPlugin;

public class GoatAbility extends JavaPlugin {

    private ConfigManager configManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        configManager = new ConfigManager(this);

        if (getCommand("goat") != null) {
            getCommand("goat").setExecutor(new GoatCommand(this));
        }

        getServer().getPluginManager().registerEvents(new ItemUseListener(this), this);
        getServer().getPluginManager().registerEvents(new GoatDamageListener(this), this);

        getLogger().info("╔════════════════════════════╗");
        getLogger().info("║   GoatAbility Enabled!     ║");
        getLogger().info("║   Use /goat to get item    ║");
        getLogger().info("╚════════════════════════════╝");
    }

    @Override
    public void onDisable() {
        getLogger().info("GoatAbility plugin has been disabled!");
    }

    public ConfigManager getConfigManager() {
        return configManager;
    }
}