himikohyuga

code for monster

Kodari AI
KodariJun 10 at 11:13 am 25

I’ll create a comprehensive custom monster plugin with leveling, abilities, bosses, and enhanced drops.

MonsterPlugin
A feature-rich custom monster system that adds depth to Minecraft mobs. Features include dynamic mob leveling with scaled stats, custom abilities (fire trail, explosive death, regeneration), boss spawns with unique mechanics, level-based enhanced drops, and customizable spawn rates. Mobs display their level and health, with difficulty scaling based on location distance. Includes admin commands for manual spawning and configuration reload.

—Created a comprehensive custom monster system with leveling, abilities, bosses, and enhanced drops.

Features:

  • Dynamic mob leveling based on distance from spawn

  • Custom abilities (fire trail, explosive death, regeneration, speed, strength, resistance)

  • Boss spawns with unique names and multiple abilities

  • Enhanced drops that scale with mob level

  • Bonus items at level thresholds

  • Health bars and level display on mob names

  • Configurable spawn rates and multipliers

  • Admin commands for spawning and management

Key Systems:

  • Mobs gain levels based on spawn distance (configurable)

  • Health and damage scale per level

  • 25% chance for abilities by default

  • 5% chance for boss spawns

  • XSeries for 1.8-1.21+ compatibility

  • All features toggleable in config

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
manifest.kod
Code
17 1,019
src/main/java/com/monster/MonsterPlugin.java
package com.monster;

import com.monster.commands.MonsterCommand;
import com.monster.listeners.MobDamageListener;
import com.monster.listeners.MobDeathListener;
import com.monster.listeners.MobSpawnListener;
import com.monster.managers.*;
import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class MonsterPlugin extends JavaPlugin {

    private ConfigManager configManager;
    private MonsterManager monsterManager;
    private LevelManager levelManager;
    private AbilityManager abilityManager;
    private BossManager bossManager;
    private DropManager dropManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        this.configManager = new ConfigManager(this);
        this.levelManager = new LevelManager(this);
        this.abilityManager = new AbilityManager(this);
        this.bossManager = new BossManager(this);
        this.dropManager = new DropManager(this);
        this.monsterManager = new MonsterManager(this);

        getCommand("monster").setExecutor(new MonsterCommand(this));

        getServer().getPluginManager().registerEvents(new MobSpawnListener(this), this);
        getServer().getPluginManager().registerEvents(new MobDamageListener(this), this);
        getServer().getPluginManager().registerEvents(new MobDeathListener(this), this);

        getLogger().info("MonsterPlugin has been enabled!");
    }

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

    public void reload() {
        reloadConfig();
        configManager = new ConfigManager(this);
        levelManager = new LevelManager(this);
        abilityManager = new AbilityManager(this);
        bossManager = new BossManager(this);
        dropManager = new DropManager(this);
        monsterManager = new MonsterManager(this);
    }
}