_ItzOmar
šŸ“Ž 1 file 1,485 chars
šŸ“„
pasted-code-1792855204859.txt
txt 16 lines
ā–¶
Create a Minecraft Paper plugin called **AdminPanelZ** for Aternos.

Features:
- `/setspawn` and `/spawn` to set and teleport to server spawn.
- `/sethome ` and `/home` with a custom GUI to manage up to **100 homes per player**. Include create, teleport, delete, and rename options.
- `/ah` for a fully functional auction house where players can list, buy, and collect items.
- `/shop` with a custom GUI inspired by DonutSMP's shop, including categories, item prices, buying, and selling.
- `/bounty  ` to place bounties on players, with rewards paid when the target is killed.
- `/discord` to display the server's Discord invite link, editable in `config.yml`.
- `/admin` to open a modern custom admin panel with clickable buttons and purple/gold styling.
- Save player homes, spawn, auctions, and bounties persistently.
- Add permissions, configurable messages, economy integration through Vault, and protection against exploits.

**Requirements:** Use Java and Paper API. Include complete source code, `plugin.yml`, `config.yml`, Maven setup, and build instructions. Make the plugin compatible with Aternos-supported server versions.

Do not use chest menus if a true custom GUI is possible. If a client-side mod is required for a custom overlay, explain the limitations and provide the best practical alternative. All commands must work, all GUI buttons must be functional, and the finished project must compile into a downloadable `.jar` file.
Kodari AI
KodariOct 24 at 3:27 pm 4
AdminPanelZ
A comprehensive Minecraft Paper plugin providing server administration tools. Features include spawn management with setspawn and spawn commands, a GUI-based home system supporting up to 100 homes per player with create, teleport, delete, and rename functions, a fully functional auction house for listing and buying items, a categorized shop system with buy/sell functionality, bounty placement with kill rewards, Discord link display, and a modern admin panel with purple/gold styling. Integrates Vault economy, persistent data storage for homes, spawns, auctions, and bounties, configurable messages, and permission-based access controls with exploit protection.
  1. Build the plugin foundation: configuration, persistence, economy bridge, and shared utilities.

  2. Add spawn and homes commands with the 100-home GUI workflow.

  3. Implement persistent auctions with listing, buying, and item collection.

  4. Add the configurable shop GUI with category browsing, buying, and selling.

  5. Add bounties, admin/Discord commands, permissions, and Maven/plugin resources.

  1. Foundation: Added the AdminPanelZ plugin, persistent YAML storage, configurable messages, and Vault economy integration.

  2. Spawn and homes: Added /setspawn, /spawn, /sethome <name>, and /home. The home menu supports creating, teleporting to, deleting, and renaming homes, with a default limit of 100 per player.

  3. Auction house: /ah supports listing held items, buying listings, collecting unsold items, and claiming sale earnings.

  4. Shop: /shop opens configurable categories; left-click to buy and right-click to sell, with shift-click stack actions.

  5. Bounties and admin: Added /bounty, /discord, and a permission-protected /admin panel with spawn, reload, broadcast, and player-teleport controls. Added pom.xml, plugin.yml, config.yml, and README.md.

The GUIs use standard inventory menus; a Paper plugin cannot provide a true client-side overlay without a client mod. Economy features require Vault and a Vault-compatible economy provider.

To get the jar in Kodari: click Compile in the desktop top bar, or on mobile tap ā‹® → Compile Project; click Compile, then Download on the successful build.

Kodari can make mistakes. Review important code before using.
Files
src
pom.xml
README.md
Code
31 2,227
src/main/java/com/adminpanelz/AdminPanelZPlugin.java
package com.adminpanelz;

import com.adminpanelz.economy.EconomyService;
import com.adminpanelz.auction.AuctionCommand;
import com.adminpanelz.auction.AuctionListener;
import com.adminpanelz.auction.AuctionService;
import com.adminpanelz.shop.ShopCommand;
import com.adminpanelz.shop.ShopListener;
import com.adminpanelz.shop.ShopService;
import com.adminpanelz.bounty.BountyCommand;
import com.adminpanelz.bounty.BountyListener;
import com.adminpanelz.bounty.BountyService;
import com.adminpanelz.admin.AdminCommand;
import com.adminpanelz.admin.AdminPanelListener;
import com.adminpanelz.discord.DiscordCommand;
import com.adminpanelz.home.HomeListener;
import com.adminpanelz.home.HomesCommand;
import com.adminpanelz.home.HomesService;
import com.adminpanelz.spawn.SpawnCommand;
import com.adminpanelz.storage.StorageFiles;
import com.adminpanelz.util.MessageService;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

public final class AdminPanelZPlugin extends JavaPlugin {
    private EconomyService economyService;
    private StorageFiles storageFiles;
    private MessageService messageService;
    private HomesService homesService;
    private AuctionService auctionService;
    private ShopService shopService;
    private BountyService bountyService;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        this.economyService = new EconomyService(this);
        this.storageFiles = new StorageFiles(this);
        this.messageService = new MessageService(this);
        this.homesService = new HomesService(this);
        this.auctionService = new AuctionService(this);
        this.shopService = new ShopService(this);
        this.bountyService = new BountyService(this);
        HomesCommand homesCommand = new HomesCommand(this, homesService);
        getCommand("sethome").setExecutor(homesCommand);
        getCommand("home").setExecutor(homesCommand);
        getCommand("spawn").setExecutor(new SpawnCommand(this));
        getCommand("setspawn").setExecutor(new SpawnCommand(this));
        getCommand("ah").setExecutor(new AuctionCommand(this));
        getCommand("shop").setExecutor(new ShopCommand(this));
        getCommand("bounty").setExecutor(new BountyCommand(this, bountyService));
        getCommand("discord").setExecutor(new DiscordCommand(this));
        getCommand("admin").setExecutor(new AdminCommand(this));
        Bukkit.getPluginManager().registerEvents(new HomeListener(this, homesService), this);
        Bukkit.getPluginManager().registerEvents(new AuctionListener(this, auctionService), this);
        Bukkit.getPluginManager().registerEvents(new ShopListener(), this);
        Bukkit.getPluginManager().registerEvents(new BountyListener(this, bountyService), this);
        Bukkit.getPluginManager().registerEvents(new AdminPanelListener(this), this);
    }

    @Override
    public void onDisable() {
        if (storageFiles != null) {
            storageFiles.saveAll();
        }
    }

    public EconomyService economy() {
        return economyService;
    }

    public StorageFiles storage() {
        return storageFiles;
    }

    public MessageService messages() {
        return messageService;
    }

    public HomesService homes() {
        return homesService;
    }

    public AuctionService auctions() {
        return auctionService;
    }

    public ShopService shop() {
        return shopService;
    }

    public BountyService bounties() {
        return bountyService;
    }
}