viroblox viroblox

PROJECT: DIVINE POWERS SMP

Complete Minecraft Plugin Development Prompt

Create a fully functional, production-ready Minecraft Java Edition plugin named Divine Powers SMP.

  1. SERVER COMPATIBILITY
  • Minecraft Version: 1.21.x
  • Server Software: Paper
  • Language: Java
  • Build System: Maven
  • Output: A fully working ".jar" plugin.
  • The plugin must work without requiring any client-side mods.
  • All configurations and player data must persist after server restarts.
  1. GODS AND DIVINE IDENTITIES

The plugin must contain a target roster of at least 150 unique divine identities, including Gods, Goddesses, Devtas and other divine figures from different religious and mythological traditions.

Include:

  • Hindu traditions
  • Greek mythology
  • Norse mythology
  • Egyptian mythology
  • Japanese mythology
  • Chinese mythology
  • Buddhist traditions
  • Abrahamic traditions
  • Other world mythologies and cultural traditions.

Represent religious figures respectfully. Fantasy abilities must be clearly treated as fictional gameplay interpretations.

Every divine identity must have:

  • Unique name
  • Unique power set
  • Unique rarity
  • Passive abilities
  • Active abilities
  • Ultimate ability
  • Custom visual effects
  • Individual cooldowns
  • Individual damage values
  • Unique kingdom theme

Do not simply duplicate abilities between different identities.

  1. PLAYER POWER ASSIGNMENT

When a player joins the server for the first time:

  1. Automatically assign exactly ONE random divine identity.
  2. Each identity must have its own rarity.
  3. Save the assigned identity permanently.
  4. Players must retain their identity after death, relogging and server restarts.
  5. Normal players cannot obtain a second divine identity.
  6. Never randomly reroll an existing player's identity when they rejoin.
  1. RARITY SYSTEM

Use the following default rarity distribution:

  • Common: 40%
  • Rare: 25%
  • Epic: 18%
  • Legendary: 10%
  • Mythic: 5%
  • Divine: 2%

The rarity system must be configurable.

Higher-rarity divine identities should be significantly harder to obtain.

  1. OPERATOR SYSTEM

Operators must have unlimited divine identity permissions.

An OP can:

  • Obtain multiple Gods' and Devtas' powers.
  • Add any divine identity to themselves.
  • Give any identity to another player.
  • Remove specific identities.
  • View all available divine identities.
  • Change a player's assigned identity.
  • Bypass normal player power restrictions.

Normal players must remain restricted to one divine identity.

  1. DIVINE KINGDOM SUMMONING SYSTEM

Whenever a player receives their first divine identity:

  • Automatically generate and summon a unique kingdom.
  • Generate the kingdom at a separate location away from existing kingdoms.
  • The kingdom must match the player's divine identity.
  • Display the kingdom coordinates on the player's screen.
  • Also provide coordinates in chat.
  • Save the kingdom location permanently.

Examples:

  • Shiva: Divine celestial kingdom.
  • Vishnu: Grand divine preservation kingdom.
  • Zeus: Lightning and sky kingdom.
  • Odin: Norse fantasy kingdom.

Each kingdom must have:

  • Unique identity.
  • Unique owner.
  • Protected territory.
  • Configurable size.
  • Permanent coordinates.
  • Automatic saving.
  • Independent ownership.
  1. KINGDOM PROTECTION

Implement a complete kingdom protection system.

Rules:

  • Only the owner has full building permissions.
  • Other players cannot break or place blocks inside another player's kingdom.
  • Prevent unauthorized container access.
  • Prevent unauthorized interaction with protected kingdom structures.
  • Protect kingdom ownership from unauthorized changes.
  • Keep kingdoms protected even when their owners are offline.
  • Prevent accidental overlap between generated kingdoms.

Provide configurable trusted-player permissions.

  1. DIVINE ABILITY SYSTEM

Every divine identity must have its own abilities.

Ability categories:

Passive Abilities

  • Permanently active effects while the identity is equipped.

Active Abilities

  • Triggered using configurable commands or item interactions.

Ultimate Ability

  • A powerful signature ability with a longer cooldown.

Each ability must have:

  • Unique name.
  • Description.
  • Activation method.
  • Cooldown.
  • Damage values.
  • Range.
  • Duration.
  • Visual and sound effects.
  • Proper permission checks.

Abilities must be balanced according to rarity.

  1. COMMAND SYSTEM

Implement these operator commands:

/divine give <player> <god> /divine giveall <god> /divine remove <player> <god> /divine list /divine info <god> /divine setrarity <god> <rarity> /divine kingdom <player> /divine reload /divine reset <player>

Implement suitable player commands:

/divine powers /divine info /divine kingdom /divine coordinates

All commands must have proper tab completion, permissions and error messages.

  1. GUI SYSTEM

Create an attractive inventory-based GUI.

Include:

  • Divine Identity Information.
  • Power Information.
  • Ability Cooldowns.
  • Rarity Display.
  • Kingdom Information.
  • Kingdom Coordinates.

Operators should also have an administration GUI for managing divine identities and player assignments.

  1. DATA STORAGE

Store:

  • Player UUIDs.
  • Assigned divine identities.
  • Unlocked identities for OPs.
  • Kingdom coordinates.
  • Kingdom ownership.
  • Kingdom protection settings.
  • Player permissions.

Use SQLite or another reliable persistent storage system.

  1. CONFIGURATION

Provide:

  • config.yml
  • gods.yml
  • rarities.yml
  • kingdoms.yml
  • messages.yml

Allow server administrators to customize:

  • Rarity probabilities.
  • Ability cooldowns.
  • Damage.
  • Kingdom size.
  • Kingdom generation distance.
  • Ability activation methods.
  • GUI messages.
  • Visual effects.
  1. PERFORMANCE AND SECURITY
  • Avoid unnecessary repeating tasks.
  • Use efficient event handling.
  • Prevent ability spam.
  • Validate all player commands.
  • Prevent unauthorized OP features.
  • Avoid excessive world generation.
  • Save data safely.
  • Handle server crashes and restarts without losing player data.
  • Ensure compatibility with Paper 1.21.x.
  1. DEVELOPMENT REQUIREMENTS

Do not provide pseudocode or incomplete example classes.

Actually implement:

  • All Java source files.
  • Main plugin class.
  • Ability management system.
  • Divine identity registry.
  • Rarity manager.
  • Kingdom generator.
  • Kingdom protection manager.
  • Player data manager.
  • GUI manager.
  • Command manager.
  • Configuration files.
  • plugin.yml.
  • Maven pom.xml.

Include all required dependencies and a complete project structure.

  1. FINAL DELIVERABLE

Deliver:

  1. Complete Maven source project.
  2. All 150+ divine identities.
  3. All unique abilities.
  4. Automatic kingdom generation.
  5. Complete OP management system.
  6. All configuration files.
  7. Compiled and working DivinePowersSMP.jar.
  8. Installation instructions.
  9. Testing instructions.

Do not claim that the plugin is complete until the source code compiles successfully and the implemented features have been tested.

IMPORTANT: The main gameplay rule is that every normal player receives exactly ONE random God or Devta identity and automatically receives a unique kingdom. Operators can obtain unlimited divine identities. This rule must never be violated by the normal player assignment system.

Kodari AI
KodariNov 9 at 9:28 am 7
DivinePowersSMP
A comprehensive Minecraft Paper plugin that assigns each player a unique divine identity from 150+ mythological figures across world traditions. Features a rarity system with configurable probabilities, automatic kingdom generation with full protection, unique passive/active/ultimate abilities per deity, persistent SQLite storage, operator administration commands, and an interactive GUI system. Includes complete configuration files for rarities, gods, kingdoms, and messages, plus a Maven build structure for Paper 1.21.x compatibility.
  1. Create the Maven/Paper plugin scaffold and persistent configuration.

  2. Add the identity catalog, weighted first-join assignment, and YAML-backed player/kingdom storage.

  3. Implement kingdom generation/protection, abilities, commands, and inventory menus.

Added the Divine Powers SMP Maven source project, including a catalog of 250 divine identities, weighted first-join assignment, persistent player powers, identity selection for operators, generated kingdoms, trusted-player protection, abilities, commands, and paginated player/admin GUIs. Configuration is in config.yml, gods.yml, rarities.yml, kingdoms.yml, and messages.yml; player and kingdom data is saved in data.yml.

I haven’t compiled this project or tested it on a live Paper server, so I can’t claim the source is verified or provide a tested JAR.

To build and download DivinePowersSMP.jar in Kodari:

  1. Click Compile in the desktop top bar, or on phone tap ⋮ → Compile Project.

  2. Click Compile in the window.

  3. When it succeeds, click Download.

For a server smoke test, install the JAR in a Paper 1.21.x server’s plugins folder and restart. Test first-join assignment and kingdom coordinates, then relog and restart to check persistence. Verify a normal player stays at one identity, an OP can hold and select multiple, and unauthorized players cannot build in a kingdom unless trusted.

Kodari can make mistakes. Review important code before using.
Files
src
pom.xml
Code
13 968
src/main/java/com/kodari/divine/DivinePowersPlugin.java
package com.kodari.divine;

import com.cryptomorin.xseries.XMaterial;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.OfflinePlayer;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.command.TabExecutor;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.Action;
import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.event.block.BlockExplodeEvent;
import org.bukkit.event.block.BlockBurnEvent;
import org.bukkit.event.block.BlockFromToEvent;
import org.bukkit.event.block.BlockIgniteEvent;
import org.bukkit.event.block.BlockPlaceEvent;
import org.bukkit.event.block.BlockPistonExtendEvent;
import org.bukkit.event.block.BlockPistonRetractEvent;
import org.bukkit.event.entity.EntityChangeBlockEvent;
import org.bukkit.event.entity.EntityDamageEvent;
import org.bukkit.event.entity.EntityExplodeEvent;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.event.inventory.InventoryMoveItemEvent;
import org.bukkit.event.inventory.InventoryOpenEvent;
import org.bukkit.event.inventory.InventoryPickupItemEvent;
import org.bukkit.event.player.PlayerArmorStandManipulateEvent;
import org.bukkit.event.player.PlayerBucketEmptyEvent;
import org.bukkit.event.player.PlayerBucketFillEvent;
import org.bukkit.event.player.PlayerInteractEntityEvent;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import net.kyori.adventure.text.Component;

import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Random;
import java.util.UUID;
import java.util.concurrent.ThreadLocalRandom;
import java.util.stream.Collectors;

public final class DivinePowersPlugin extends org.bukkit.plugin.java.JavaPlugin implements Listener, TabExecutor {
    private static final String PLAYER_GUI = "&8Divine Powers";
    private static final String ADMIN_GUI = "&8Manage players";
    private static final String IDENTITIES_GUI = "&8Assign identity";
    private static final String ADMIN_IDENTITIES_GUI = "&8Identity catalog";
    private static final String OWN_IDENTITIES_GUI = "&8Your identities";
    private PlayerDataStore store;
    private KingdomManager kingdoms;
    private AbilityManager abilities;
    private IdentityRegistry registry;
    private YamlConfiguration rarityConfig;
    private YamlConfiguration godsConfig;
    private YamlConfiguration messagesConfig;
    private YamlConfiguration kingdomConfig;
    private final Map<UUID, UUID> selectedAdminTargets = new java.util.HashMap<>();
    private final Map<UUID, Integer> adminPages = new java.util.HashMap<>();
    private final Map<UUID, Integer> identityPages = new java.util.HashMap<>();
    private final Map<UUID, Integer> catalogPages = new java.util.HashMap<>();
    private final Map<UUID, Integer> ownedPages = new java.util.HashMap<>();

    @Override
    public void onEnable() {
        saveDefaultConfig();
        saveResourceIfMissing("gods.yml"); saveResourceIfMissing("rarities.yml");
        saveResourceIfMissing("kingdoms.yml"); saveResourceIfMissing("messages.yml");
        loadCustomConfigs();
        store = new PlayerDataStore(getDataFolder());
        kingdoms = new KingdomManager(this);
        abilities = new AbilityManager(this);
        registry = new IdentityRegistry(godsConfig.getConfigurationSection("identities"));
        Bukkit.getPluginManager().registerEvents(this, this);
        if (getCommand("divine") != null) { getCommand("divine").setExecutor(this); getCommand("divine").setTabCompleter(this); }
        getLogger().info("Loaded " + registry.size() + " fictional divine identities.");
    }

    @Override
    public void onDisable() { if (store != null) store.save(); }

    private void saveResourceIfMissing(String name) {
        File file = new File(getDataFolder(), name);
        if (!file.exists()) saveResource(name, false);
    }

    private void loadCustomConfigs() {
        rarityConfig = YamlConfiguration.loadConfiguration(new File(getDataFolder(), "rarities.yml"));
        godsConfig = YamlConfiguration.loadConfiguration(new File(getDataFolder(), "gods.yml"));
        messagesConfig = YamlConfiguration.loadConfiguration(new File(getDataFolder(), "messages.yml"));
        kingdomConfig = YamlConfiguration.loadConfiguration(new File(getDataFolder(), "kingdoms.yml"));
    }

    PlayerDataStore store() { return store; }
    YamlConfiguration kingdomConfig() { return kingdomConfig; }
    String msg(String message) { return ChatColor.translateAlternateColorCodes('&', message); }
    private String message(String key, String fallback) {
        String value = messagesConfig.getString(key);
        if (value == null) value = getConfig().getString("messages." + key, fallback);
        return msg(value);
    }
    private DivineIdentity identity(String name) { return registry.get(name); }
    private DivineIdentity primary(Player player) {
        String name = store.primaryIdentity(player.getUniqueId());
        if (name.isBlank()) return null;
        return registry.get(name);
    }

    @EventHandler
    public void onJoin(PlayerJoinEvent event) {
        Player player = event.getPlayer();
        UUID uuid = player.getUniqueId();
        if (!store.hasPlayer(uuid) || store.identities(uuid).isEmpty()) {
            DivineIdentity chosen = chooseRandomIdentity();
            store.assign(uuid, chosen.key(), true);
            sendAssigned(player, chosen, true);
        } else if (!player.isOp() && store.identities(uuid).size() > 1) {
            String primary = store.primaryIdentity(uuid);
            if (primary.isBlank()) primary = store.identities(uuid).get(0);
            store.assign(uuid, primary, true);
        }
        DivineIdentity chosen = primary(player);
        if (chosen != null) abilities.applyPassive(player, chosen);
        if (store.kingdom(uuid) == null && chosen != null) ensureKingdom(player, chosen, true);
        else if (chosen != null) store.kingdom(uuid, store.kingdom(uuid), chosen.key(), chosen.name() + "'s " + chosen.theme());
    }

    private DivineIdentity chooseRandomIdentity() {
        List<String> rarities = List.of("COMMON", "RARE", "EPIC", "LEGENDARY", "MYTHIC", "DIVINE");
        int total = 0;
        for (String rarity : rarities) total += Math.max(0, rarityConfig.getInt("weights." + rarity, 0));
        if (total <= 0) return registry.all().get(ThreadLocalRandom.current().nextInt(registry.size()));
        int roll = ThreadLocalRandom.current().nextInt(total), cumulative = 0;
        String selected = "COMMON";
        for (String rarity : rarities) {
            cumulative += Math.max(0, rarityConfig.getInt("weights." + rarity, 0));
            if (roll < cumulative) { selected = rarity; break; }
        }
        List<DivineIdentity> choices = registry.byRarity(selected);
        if (choices.isEmpty()) choices = registry.all();
        return choices.get(ThreadLocalRandom.current().nextInt(choices.size()));
    }

    private void sendAssigned(Player player, DivineIdentity identity, boolean makeKingdom) {
        player.sendMessage(message("assigned", "&dThe fictional divine identity &f{god} &dhas chosen you!").replace("{god}", identity.name()));
        if (makeKingdom) ensureKingdom(player, identity, true);
    }

    private void ensureKingdom(Player player, DivineIdentity identity, boolean announce) {
        Location location = store.kingdom(player.getUniqueId());
        if (location == null) location = kingdoms.create(player, identity);
        else store.kingdom(player.getUniqueId(), location, identity.key(), identity.name() + "'s " + identity.theme());
        if (location == null) { player.sendMessage(msg("&cYour identity was saved, but no safe kingdom location was found.")); return; }
        if (announce) {
            String coords = location.getBlockX() + ", " + location.getBlockY() + ", " + location.getBlockZ();
            String text = message("kingdom", "&6Your kingdom &f{kingdom} &6is at &e{x}, {y}, {z} &6in &e{world}&6.")
                    .replace("{kingdom}", store.kingdomName(player.getUniqueId())).replace("{x}", String.valueOf(location.getBlockX()))
                    .replace("{y}", String.valueOf(location.getBlockY())).replace("{z}", String.valueOf(location.getBlockZ())).replace("{world}", location.getWorld().getName());
            player.sendMessage(text);
            player.sendActionBar(Component.text(ChatColor.stripColor(text)));
        }
    }

    private void assign(Player target, DivineIdentity identity) {
        boolean replace = !target.isOp();
        boolean first = store.identities(target.getUniqueId()).isEmpty();
        store.assign(target.getUniqueId(), identity.key(), replace);
        DivineIdentity active = primary(target);
        if (active == null) active = identity;
        if (first || store.kingdom(target.getUniqueId()) == null) ensureKingdom(target, active, true);
        else store.kingdom(target.getUniqueId(), store.kingdom(target.getUniqueId()), active.key(), active.name() + "'s " + active.theme());
        target.sendMessage(msg("&dYour divine identity is now &f" + identity.name() + "&d."));
        abilities.applyPassive(target, active);
    }

    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if (sender instanceof Player player && !player.isOp() && store.identities(player.getUniqueId()).size() > 1) {
            String active = store.primaryIdentity(player.getUniqueId());
            if (active.isBlank()) active = store.identities(player.getUniqueId()).get(0);
            store.assign(player.getUniqueId(), active, true);
        }
        if (args.length == 0) {
            if (sender instanceof Player player) openPlayerGui(player);
            else sendHelp(sender);
            return true;
        }
        String sub = args[0].toLowerCase(Locale.ROOT);
        if (sub.equals("powers")) {