mingming_07
📎 1 file 8,133 chars
📄
pasted-code-1784371779405.txt
txt 462 lines
▶
Marriage/Bloodline Legacy Plugin - Complete Requirements Specification
Overview

Develop a Minecraft Paper/Spigot plugin called Bloodline Legacy that provides a complete marriage and family system through commands and a modern interactive INVENTORY GUI.

The plugin should be lightweight, modular, fully configurable, and easy to expand with future features.

Main Menu
/marriage

Typing /marriage without arguments should open the Main Marriage INVENTORY GUI.

The INVENTORY GUI serves as the central hub for all marriage-related features.

The INVENTORY GUI should include buttons for:
Marriage Information
Family Tree
Shared Home
Shared Chest
Couple Chat
Teleport to Partner
Kiss Partner
Gift Partner
Daily Reward
Gender Settings
Surname Settings
Divorce
Future features

Every INVENTORY GUI element must be configurable in INVENTORY GUI.yml, including:

Inventory size
Slots
Item materials
Player heads
Lore
Sounds
Titles
Click actions
Decorative items
Marriage System
Marriage Proposal
Command

/marriage 

Sends a marriage proposal to another online player.

Server Announcement

When a proposal is sent, broadcast a configurable server-wide message.

Example:

Steve is proposing to Alex!

This message should be configurable in messages.yml.

Accept Proposal
Command

/marriage accept

Accepts the pending marriage proposal.

After acceptance:

Create the marriage.
Update both player profiles.
Broadcast a configurable server-wide announcement.

Example:

Alex said YES! ❤️ You two are the perfect match. Congratulations!

Deny Proposal
Command

/marriage deny

Declines the proposal.

Broadcast another configurable announcement.

Example:

Alex said NO! Relationships are temporary. Minecraft is eternal. Let's go kill the Ender Dragon.

Marriage Information
Command

/marriage info

Displays:

Spouse
Marriage date
Days married
Shared home status
Surname
Children
Daily reward status
Divorce
Command

/marriage divorce

Ends the marriage.

Support configurable:

Confirmation INVENTORY GUI
Cooldowns
Divorce cost
Broadcast messages
Nearby Spouse Effect

Whenever two married players are within a configurable distance:

Default:

6 blocks

Display the vanilla Minecraft villager breeding heart particles above BOTH players.

Requirements:

Runs continuously while nearby.
Stops immediately when players move apart.
Distance configurable.
Particle type configurable.
Particle frequency configurable.
Couple Chat
Commands

/marriage chat

Toggles private couple chat.

Shortcut:

/mm 

Instantly sends a private message to your spouse.

Shared Home

Commands:

/marriage sethome

/marriage home

Allows couples to share a home location.

Support:

Teleport cooldown
Safety checks
Configurable restrictions
Shared Chest

Command:

/marriage chest

Opens a shared inventory that both spouses can access.

Chest size should be configurable.

Gift System

Command:

/marriage gift

Transfers the item currently held in the player's hand to their spouse.

Kiss System

Command:

/marriage kiss

Requirements:

Partner must be nearby.
Distance configurable.
Cooldown configurable.

Effects:

Heart particles
Kiss sound
Optional animation
Teleport

Command:

/marriage tp

Teleports to your spouse.

Requirements:

Permission
Cooldown
Safe teleport
World restrictions
Daily Rewards

Command:

/marriage daily

Allows couples to claim daily rewards.

Rewards should support:

Money
Items
Experience
Console commands
Daily streak bonuses
Family System
Adopt Child

Command:

/marriage child 

Sends a child proposal.

Receiving player can use:

/marriage child accept

or

/marriage child deny

Disown Child

Command:

/marriage disown 

Removes the parent-child relationship.

Leave Parents

Command:

/marriage leaveparents

Allows a child to remove themselves from their parents.

Family Tree INVENTORY GUI
Command

/marriage tree

Opens an interactive family tree INVENTORY GUI.

Requirements

Every family member should appear as their Minecraft player head.

Each player head should display:

Player skin
Player name
Relationship

Hovering over a player head should show information such as:

Steve

Relationship:

Spouse
Father
Mother
Son
Daughter
Grandchild
Great-Grandchild
Great-Great-Grandchild

Support unlimited generations.

The family tree should automatically update whenever relationships change.

Surname System
Set Surname

Command:

/marriage surname 

Adds a surname to the player's display name without changing their actual Minecraft username.

Example:

Original Username:

Steve

Surname:

Smith

Displayed Name:

Steve Smith

The display format should be configurable.

Toggle Surname

Command:

/marriage surname toggle

Allows players to enable or disable displaying their surname.

The surname should appear in:

Chat
Tab List
Scoreboard
Name Tags (optional)
Marriage INVENTORY GUI
Marriage Information
Family Tree INVENTORY GUI

Internally, the original Minecraft username must remain unchanged.

Gender System

Command:

/marriage gender 

Allows players to set their gender.

The available gender options should be configurable.

Commands
Player Commands
/marriage  — Send a marriage proposal.
/marriage accept — Accept a proposal.
/marriage deny — Deny a proposal.
/marriage info — View marriage information.
/marriage divorce — Divorce your spouse.
/marriage gender  — Set your gender.
/marriage chat — Toggle private couple chat.
/marriage sethome — Set the shared home.
/marriage home — Teleport to the shared home.
/marriage chest — Open the shared chest.
/marriage gift — Gift the item in your hand.
/marriage kiss — Kiss your spouse.
/marriage tp — Teleport to your spouse.
/mm  — Send a private message to your spouse.
/marriage daily — Claim daily rewards.
/marriage child  — Request to adopt a child.
/marriage child accept — Accept a child request.
/marriage child deny — Deny a child request.
/marriage disown  — Disown a child.
/marriage leaveparents — Leave your parents.
/marriage surname  — Set a surname.
/marriage surname toggle — Toggle surname display.
/marriage tree — Open the Family Tree INVENTORY GUI.
Admin Commands

/marriage reload

Reloads:

config.yml
messages.yml
INVENTORY GUI.yml

without restarting the server.

Permissions
xmarriage.admin

Allows:

/marriage reload
xmarriage.teleport

Allows:

/marriage tp

Granted to all players by default.

Configuration
config.yml

Should allow configuration of:

Enable/disable features
Marriage settings
Divorce settings
Kiss cooldown
Teleport cooldown
Shared chest size
Home settings
Daily rewards
Heart particle effect
Proximity distance
Pregnancy/family timers (future support)
Maximum children
Maximum generations
World restrictions
Database settings
messages.yml

Contains 100% of all player-facing messages.

Supports:

Legacy color codes
HEX colors
PlaceholderAPI
Broadcast messages
Marriage announcements
Divorce announcements
Child system messages
INVENTORY GUI text
INVENTORY GUI.yml

Allows full customization of every INVENTORY GUI.

Should support configuring:

INVENTORY GUI titles
Layout
Inventory size
Item materials
Player heads
Slots
Lore
Sounds
Commands
Decorative items
Click actions
Technical Requirements
Paper/Spigot compatible
Lightweight and optimized
Fully configurable
Modular codebase
Expandable for future updates
Unlimited family generations
Interactive INVENTORY GUI-based navigation
Dynamic player heads in the Family Tree
Real-time surname updates in chat, tab list, and scoreboard
Real-time nearby spouse heart particle effect
Configurable server-wide announcements for marriage proposals, accepted proposals, and denied proposals
Kodari AI
KodariJul 18 at 10:56 am 2

I’ll create the BloodlineLegacy plugin - a comprehensive marriage and family system.

BloodlineLegacy
A comprehensive marriage and family system plugin for Paper/Spigot servers. Features include marriage proposals with server-wide announcements, shared homes and chests, private couple chat, kiss and gift systems, teleportation to spouse, daily rewards with streak bonuses, adoptable children with unlimited family tree generations, interactive family tree GUI with player heads, customizable surname system visible in chat/tab, gender settings, configurable proximity heart particle effects, and full GUI customization via config files. All messages are fully configurable with PlaceholderAPI support.

Batch 1: Build files, configs, and data models

Batch 2: Data models and inventory framework

Batch 3: Utilities

Batch 4: Config managers

Batch 5: Database manager

Batch 6: Managers

Batch 7: GUI implementations

Batch 8: Tasks, listeners, commands, and main plugin

All files created. The plugin is structured with:

Core: BloodlineLegacy.java - main plugin class with all managers wired up Config: ConfigManager, MessagesManager, GUIConfigManager - fully reloadable via /marriage reload Data: PlayerData, MarriageData, Proposal, DatabaseManager - SQLite/MySQL storage GUI Framework: InventoryGUI (lazy init), InventoryButton, InventoryHandler, GUIManager, GUIListener GUI Implementations: MainMarriageGUI, MarriageInfoGUI, FamilyTreeGUI (paginated, unlimited generations), DivorceConfirmGUI, GenderSettingsGUI, SurnameSettingsGUI Managers: MarriageManager, ProposalManager, FamilyManager, SurnameManager, DailyRewardManager, CoupleChatManager, GiftManager, TeleportManager, HomeManager, SharedChestManager, GenderManager, KissCooldownManager Commands: /marriage (all subcommands), /mm (quick chat), tab completion Listeners: MarriageListener (join, chat, surname), GUIListener (inventory events) Tasks: ProximityEffectTask (heart particles when spouses are nearby) Utils: MessageUtil (colorize, placeholders, messaging), ItemBuilder (item creation)

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
45 3,897
src/main/java/com/bloodlinelegacy/BloodlineLegacy.java
package com.bloodlinelegacy;

import com.bloodlinelegacy.command.CommandCompleter;
import com.bloodlinelegacy.command.MarriageChatCommand;
import com.bloodlinelegacy.command.MarriageCommand;
import com.bloodlinelegacy.config.ConfigManager;
import com.bloodlinelegacy.config.GUIConfigManager;
import com.bloodlinelegacy.config.MessagesManager;
import com.bloodlinelegacy.data.DatabaseManager;
import com.bloodlinelegacy.inventory.gui.GUIListener;
import com.bloodlinelegacy.inventory.gui.GUIManager;
import com.bloodlinelegacy.listener.MarriageListener;
import com.bloodlinelegacy.manager.*;
import com.bloodlinelegacy.task.ProximityEffectTask;
import com.bloodlinelegacy.util.MessageUtil;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class BloodlineLegacy extends JavaPlugin {

    private ConfigManager configManager;
    private MessagesManager messagesManager;
    private GUIConfigManager guiConfigManager;
    private DatabaseManager databaseManager;
    private MarriageManager marriageManager;
    private ProposalManager proposalManager;
    private FamilyManager familyManager;
    private SurnameManager surnameManager;
    private DailyRewardManager dailyRewardManager;
    private CoupleChatManager coupleChatManager;
    private GiftManager giftManager;
    private TeleportManager teleportManager;
    private HomeManager homeManager;
    private SharedChestManager sharedChestManager;
    private GenderManager genderManager;
    private KissCooldownManager kissCooldownManager;
    private GUIManager guiManager;

    @Override
    public void onEnable() {
        // Initialize configs
        this.configManager = new ConfigManager(this);
        this.messagesManager = new MessagesManager(this);
        this.guiConfigManager = new GUIConfigManager(this);

        // Initialize utilities
        MessageUtil.init(this);

        // Initialize database
        this.databaseManager = new DatabaseManager(this);

        // Initialize managers
        this.marriageManager = new MarriageManager(this);
        this.proposalManager = new ProposalManager(this);
        this.familyManager = new FamilyManager(this);
        this.surnameManager = new SurnameManager(this);
        this.dailyRewardManager = new DailyRewardManager(this);
        this.coupleChatManager = new CoupleChatManager(this);
        this.giftManager = new GiftManager(this);
        this.teleportManager = new TeleportManager(this);
        this.homeManager = new HomeManager(this);
        this.sharedChestManager = new SharedChestManager(this);
        this.genderManager = new GenderManager(this);
        this.kissCooldownManager = new KissCooldownManager(this);

        // Initialize GUI system
        this.guiManager = new GUIManager();
        Bukkit.getPluginManager().registerEvents(new GUIListener(guiManager), this);

        // Register commands
        getCommand("marriage").setExecutor(new MarriageCommand(this));
        getCommand("marriage").setTabCompleter(new CommandCompleter(this));
        getCommand("mm").setExecutor(new MarriageChatCommand(this));

        // Register listeners
        Bukkit.getPluginManager().registerEvents(new MarriageListener(this), this);

        // Start proximity effect task
        Bukkit.getScheduler().runTaskTimer(this, new ProximityEffectTask(this),
                40L, this.configManager.getProximityFrequency());

        // Update surnames for all online players
        this.surnameManager.updateAllOnline();

        getLogger().info("Bloodline Legacy v" + getDescription().getVersion() + " enabled!");
    }

    @Override
    public void onDisable() {
        // Save shared chests
        if (sharedChestManager != null) {
            sharedChestManager.saveAll();
        }

        // Close database
        if (databaseManager != null) {
            databaseManager.close();
        }

        getLogger().info("Bloodline Legacy disabled!");
    }
}