GreenGold OG

“I need a plugin that includes four elemental fathers: Fire Father, Earth Father, Land Father, and Water Father.” when player spawn get any 1 random father

Kodari AI
KodariSep 5 at 4:47 am 1
ElementalFathers
A Minecraft plugin that assigns each player a random elemental father upon spawn. Four elemental fathers exist: Fire Father, Earth Father, Land Father, and Water Father. When a player joins or respawns, the plugin randomly selects one father and applies its associated effects, permissions, or visual indicators. The plugin tracks each player's assigned father persistently, allowing for future expansion of father-specific abilities, chat prefixes, or gameplay modifiers. Configuration options enable server admins to customize father weights, effect durations, and whether reassignment occurs on respawn or only on first join.
  1. Create the Gradle project and plugin metadata.

  2. Add the four elemental father definitions and random assignment manager.

  3. Register a spawn listener that assigns and announces one random father on every player spawn.

Created the ElementalFathers plugin.

  • Added four fathers: Fire, Earth, Land, and Water.

  • Every player spawn randomly assigns one father.

  • Assignment is stored for the player session.

  • The player receives a formatted message announcing their elemental father.

  • Added Gradle setup, plugin.yml, and configurable message text.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
8 124
src/main/java/com/example/elementalfathers/ElementalFathersPlugin.java
package com.example.elementalfathers;

import org.bukkit.plugin.java.JavaPlugin;

public final class ElementalFathersPlugin extends JavaPlugin {

    private FatherManager fatherManager;

    @Override
    public void onEnable() {
        fatherManager = new FatherManager(this);
        getServer().getPluginManager().registerEvents(new PlayerSpawnListener(this, fatherManager), this);
    }

    public FatherManager getFatherManager() {
        return fatherManager;
    }
}