notviksu

GapTeam – Complete Minecraft Team Plugin Specification

Plugin Name

GapTeam

Platform

Paper / Spigot 1.21+

Java 21+

MySQL & SQLite support

Fully configurable

Async database operations

Optimized for large servers

---

General Requirements

Create a complete, professional Minecraft Team Plugin with a modern INVENTORY GUI system.

The plugin must NOT use scoreboard teams.

Team ranks must NEVER appear in:

Chat

Tab List

Nametags

Scoreboards

Player List

Death Messages

Join/Quit Messages

Ranks (Owner, Co-Owner, Moderator, Member) must only be visible inside Team INVENTORY GUI menus.

Everything must be configurable from config.yml, messages.yml and INVENTORY GUI.yml.

---

Team Levels

Only four levels exist.

Level 1 — Coal

Display Name: §8Coal

Item:

COAL

Perks:

Storage Rows: 3

Max Members: 5

Bank Interest: 0.2% every 24 hours

Potion Effect:

Speed I

Team Particle:

VILLAGER_HAPPY

---

Level 2 — Iron

Display Name: §fIron

Item:

IRON_INGOT

Perks:

Storage Rows: 4

Max Members: 7

Bank Interest: 0.4% every 24 hours

Potion Effect:

Speed II

Team Particle:

FLAME

---

Level 3 — Gold

Display Name: §eGold

Item:

GOLD_INGOT

Perks:

Storage Rows: 5

Max Members: 10

Bank Interest: 0.7% every 24 hours

Potion Effects:

Speed III

Haste III

Team Particle:

CRIT_MAGIC

---

Level 4 — Diamond

Display Name: §bDiamond

Item:

DIAMOND

Perks:

Storage Rows: 6

Max Members: 12

Bank Interest: 1.0% every 24 hours

Potion Effects:

Speed III

Fire Resistance

Team Particle:

HEART

---

Team Level System

Admins can configure requirements using:

/team level <level> <requirements>

Example requirements:

Team Balance

Total Kills

Blocks Broken

Mobs Killed

Crops Harvested

Play Time

XP

Money

Custom PlaceholderAPI values

When every requirement is completed:

Team levels up automatically.

Broadcast a configurable announcement.

Unlock new perks instantly.

Increase storage automatically.

Increase max members automatically.

Upgrade potion effects automatically.

Upgrade bank interest automatically.

Upgrade particles automatically.

Only Levels 1–4 exist.

---

Team Commands

/team

If player has NO team:

Open "You Have No Team" INVENTORY GUI.

Buttons:

Create Team

Browse Teams

Help

If player already has a team:

Open Team Main Menu.

---

/team create <name>

/team disband

/team invite <player>

/team accept

/team deny

/team leave

/team kick <player>

/team promote <player>

/team demote <player>

/team chat

/team rename <name>

/team home

/team sethome

/team delhome

/team warp

/team setwarp <name>

/team delwarp <name>

/team bank

/team deposit <amount>

/team withdraw <amount>

/team storage

/team upgrades

/team members

/team settings

/team help

/team leaderboard

/team level

/team particles

/team particlestoggle

---

Team INVENTORY GUI

Display:

Team Name

Team Tag

Team Level

Team Owner

Team Balance

Storage

Home

Warps

Online Members

Offline Members

Current Perks

Next Level Progress

Upgrade Requirements

Bank

Settings

Team Chat

Invite Members

Member list must be scrollable.

Every player head should appear.

Ranks should only appear inside INVENTORY GUI.

---

Team Storage

Level 1 = 10 Rows

Level 2 = 20 Rows

Level 3 = 30 Rows

Level 4 = 40 Rows

Shared storage for all members.

---

Team Bank

Commands:

/team deposit

/team withdraw

Features:

Shared balance

Transaction history

Daily interest

Auto interest every 24 hours

Interest:

Level 1 = 0.2%

Level 2 = 0.4%

Level 3 = 0.7%

Level 4 = 1.0%

---

Team Home

Features:

One Team Home

Teleport Delay

Configurable Cooldown

Safe Teleport

---

Team Warps

Multiple warps.

INVENTORY GUI selection.

Rename/Delete support.

---

Team Chat

Private chat.

Toggle with

/team chat

---

Team Leaderboard

/team leaderboard

Shows:

Richest Teams

Highest Level Teams

Most Kills

Most Members

Most Playtime

INVENTORY GUI Based.

---

Team Help

/team help

Shows every command with descriptions.

INVENTORY GUI + Chat version.

---

Team Particles

Commands:

/team particles

/team particlestoggle

Players can enable or disable particles.

Saved permanently.

Particles update automatically after level up.

---

Potion Effects

Automatically apply perks while online.

Level 1 Speed I

Level 2 Speed II

Level 3 Speed III Haste III

Level 4 Speed III Fire Resistance

Automatically removed when leaving the team.

---

Permissions

gapteam.admin

gapteam.create

gapteam.invite

gapteam.kick

gapteam.withdraw

gapteam.home

gapteam.warp

gapteam.storage

gapteam.level

gapteam.reload

---

Admin Commands

/team reload

/team level

/team reset

/team delete

/team info

/team setlevel

/team givebank

/team takebank

/team addxp

/team removexp

---

Configuration

messages.yml

config.yml

INVENTORY GUI.yml

levels.yml

particles.yml

permissions.yml

storage.yml

bank.yml

Everything must be configurable.

---

Performance

Async saving

No memory leaks

TPS friendly

Supports PlaceholderAPI

Supports Vault

Supports LuckPerms

Supports DecentHolograms

Supports Geyser/Floodgate

Supports MiniMessage

Supports Hex Colors

---

Final Requirements

Professional INVENTORY GUI design

Smooth animations

Sound effects

Full tab completion

No command conflicts

No scoreboard teams

Fully configurable

Clean API

Production-ready code

Compatible with Paper/Spigot 1.21+

Plugin Name: GapTeam

Kodari AI
KodariJun 28 at 11:30 am 5

I’ll build the GapTeam plugin — a complete team management system with inventory GUIs, async database, level progression, bank, storage, warps, particles, and potion effects.

GapTeam
A complete Minecraft team plugin with inventory-based GUI menus, async MySQL/SQLite database, team levels (Coal/Iron/Gold/Diamond) with auto-upgrade, shared bank with daily interest, shared storage, warps, home with delay/cooldown, team chat, leaderboards, particles, potion effects, and full PlaceholderAPI/Vault/LuckPerms/DecentHolograms support. Fully configurable via YAML.

Creating utility classes, models, and core infrastructure first:

Now creating the database layer and config management:

Now creating the DatabaseManager, ConfigManager, Messages config, and all Manager classes:

Now creating the manager classes - TeamManager, BankManager, StorageManager, WarpManager, LevelManager, PotionManager, ParticleManager, InterestManager:

Now creating the inventory GUI framework:

Now creating all GUI implementations:

Now creating the commands:

Now creating the PlaceholderAPI expansion and main plugin class:

Now creating all resource files:

Now let me check if the project structure is correct and all files were created:

I need to also add a build.gradle. Let me check files that got created.

Let me verify the project structure now.

Many files were cut off. Let me create them all now — starting with ParticleManager, InterestManager, inventory framework, GUIs, commands, main class, and resources.

Still missing many files. Let me create them all in batches.

Now let me verify everything got created:

Kodari can make mistakes. Review important code before using.
Files
src
Code
21 2,491
src/main/java/com/gapteam/database/MySQLAdapter.java
package com.gapteam.database;

import com.gapteam.GapTeamPlugin;
import com.gapteam.model.*;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.sql.*;
import java.util.*;
import java.util.logging.Level;

public class MySQLAdapter implements DatabaseAdapter {
    private final GapTeamPlugin plugin;
    private final String host, database, username, password;
    private final int port;
    private Connection connection;

    public MySQLAdapter(GapTeamPlugin plugin) {
        this.plugin = plugin;
        var config = plugin.getConfigManager().getConfig();
        this.host = config.getString("database.host", "localhost");
        this.port = config.getInt("database.port", 3306);
        this.database = config.getString("database.database", "gapteam");
        this.username = config.getString("database.username", "root");
        this.password = config.getString("database.password", "");
    }

    @Override
    public void connect() throws Exception {
        Class.forName("com.mysql.cj.jdbc.Driver");
        String url = "jdbc:mysql://" + host + ":" + port + "/" + database +
                "?useSSL=false&characterEncoding=utf8";
        connection = DriverManager.getConnection(url, username, password);
        createTables();
    }

    private void createTables() throws SQLException {
        try (Statement stmt = connection.createStatement()) {
            stmt.execute("""
                CREATE TABLE IF NOT EXISTS teams (
                    id INT AUTO_INCREMENT PRIMARY KEY,
                    name VARCHAR(32) UNIQUE NOT NULL,
                    owner VARCHAR(36) NOT NULL,
                    level TINYINT DEFAULT 1,
                    balance DOUBLE DEFAULT 0,
                    home_world VARCHAR(64),
                    home_x DOUBLE, home_y DOUBLE, home_z DOUBLE,
                    home_yaw FLOAT, home_pitch FLOAT,
                    has_home BOOLEAN DEFAULT FALSE,
                    created_at BIGINT NOT NULL,
                    kills INT DEFAULT 0,
                    blocks_broken INT DEFAULT 0,
                    mobs_killed INT DEFAULT 0,
                    crops_harvested INT DEFAULT 0,
                    play_time BIGINT DEFAULT 0,
                    team_xp BIGINT DEFAULT 0,
                    particles_enabled BOOLEAN DEFAULT TRUE
                )
            """);
            stmt.execute("""
                CREATE TABLE IF NOT EXISTS team_members (
                    team_id INT NOT NULL,
                    player_uuid VARCHAR(36) NOT NULL,
                    rank VARCHAR(16) NOT NULL,
                    joined_at BIGINT NOT NULL,
                    PRIMARY KEY (team_id, player_uuid),
                    FOREIGN KEY (team_id) REFERENCES teams(id) ON DELETE CASCADE
                )
            """);
            stmt.execute("""
                CREATE TABLE IF NOT EXISTS team_warps (
                    id INT AUTO_INCREMENT PRIMARY KEY,
                    team_id INT NOT NULL,
                    name VARCHAR(32) NOT NULL,
                    world VARCHAR(64) NOT NULL,
                    x DOUBLE NOT NULL, y DOUBLE NOT NULL, z DOUBLE NOT NULL,
                    yaw FLOAT, pitch FLOAT,
                    FOREIGN KEY (team_id) REFERENCES teams(id) ON DELETE CASCADE
                )
            """);
            stmt.execute("""
                CREATE TABLE IF NOT EXISTS team_transactions (
                    id INT AUTO_INCREMENT PRIMARY KEY,
                    team_id INT NOT NULL,
                    player_uuid VARCHAR(36) NOT NULL,
                    amount DOUBLE NOT NULL,
                    type VARCHAR(16) NOT NULL,
                    timestamp BIGINT NOT NULL,
                    FOREIGN KEY (team_id) REFERENCES teams(id) ON DELETE CASCADE
                )
            """);
            stmt.execute("""
                CREATE TABLE IF NOT EXISTS team_storage (
                    team_id INT PRIMARY KEY,
                    contents LONGBLOB,
                    FOREIGN KEY (team_id) REFERENCES teams(id) ON DELETE CASCADE
                )
            """);
        }
    }

    @Override
    public void disconnect() {
        try {
            if (connection != null && !connection.isClosed()) {
                connection.close();
            }
        } catch (SQLException e) {
            plugin.getLogger().log(Level.WARNING, "Error closing database", e);
        }
    }

    @Override
    public boolean isConnected() {
        try {
            return connection != null && !connection.isClosed();
        } catch (SQLException e) {
            return false;
        }
    }

    private Connection getConnection() throws SQLException {
        if (!isConnected()) {
            try {
                connect();
            } catch (Exception e) {
                throw new SQLException("Cannot reconnect", e);
            }
        }
        return connection;
    }

    private Team mapTeam(ResultSet rs) throws SQLException {
        Team team = new Team();
        team.setId(rs.getInt("id"));
        team.setName(rs.getString("name"));
        team.setOwner(UUID.fromString(rs.getString("owner")));
        team.setLevel(TeamLevel.fromLevel(rs.getInt("level")));
        team.setBalance(rs.getDouble("balance"));
        team.setHomeWorld(rs.getString("home_world"));
        team.setHomeX(rs.getDouble("home_x"));
        team.setHomeY(rs.getDouble("home_y"));
        team.setHomeZ(rs.getDouble("home_z"));
        team.setHomeYaw(rs.getFloat("home_yaw"));
        team.setHomePitch(rs.getFloat("home_pitch"));
        team.setHasHome(rs.getBoolean("has_home"));
        team.setCreatedAt(rs.getLong("created_at"));
        team.setKills(rs.getInt("kills"));
        team.setBlocksBroken(rs.getInt("blocks_broken"));
        team.setMobsKilled(rs.getInt("mobs_killed"));
        team.setCropsHarvested(rs.getInt("crops_harvested"));
        team.setPlayTime(rs.getLong("play_time"));
        team.setTeamXp(rs.getLong("team_xp"));
        team.setParticlesEnabled(rs.getBoolean("particles_enabled"));
        return team;
    }

    @Override
    public void createTeam(Team team) {
        String sql = "INSERT INTO teams (name, owner, level, balance, created_at, particles_enabled) VALUES (?,?,?,?,?,?)";
        try (PreparedStatement ps = getConnection().prepareStatement(sql, Statement.RETURN_GENERATED_KEYS)) {
            ps.setString(1, team.getName());
            ps.setString(2, team.getOwner().toString());
            ps.setInt(3, team.getLevel().getLevel());
            ps.setDouble(4, team.getBalance());
            ps.setLong(5, team.getCreatedAt());
            ps.setBoolean(6, team.isParticlesEnabled());
            ps.executeUpdate();
            try (ResultSet keys = ps.getGeneratedKeys()) {
                if (keys.next()) team.setId(keys.getInt(1));
            }
            saveMember(team.getId(), team.getMember(team.getOwner()));
        } catch (SQLException e) {
            plugin.getLogger().log(Level.SEVERE, "Error creating team", e);
        }
    }

    @Override
    public void saveTeam(Team team) {
        String sql = "UPDATE teams SET name=?, owner=?, level=?, balance=?, " +
                "home_world=?, home_x=?, home_y=?, home_z=?, home_yaw=?, home_pitch=?, " +
                "has_home=?, kills=?, blocks_broken=?, mobs_killed=?, crops_harvested=?, " +
                "play_time=?, team_xp=?, particles_enabled=? WHERE id=?";
        try (PreparedStatement ps = getConnection().prepareStatement(sql)) {
            ps.setString(1, team.getName());
            ps.setString(2, team.getOwner().toString());
            ps.setInt(3, team.getLevel().getLevel());
            ps.setDouble(4, team.getBalance());
            if (team.getHomeLocation() != null) {
                ps.setString(5, team.getHomeWorld());
                ps.setDouble(6, team.getHomeX());
                ps.setDouble(7, team.getHomeY());
                ps.setDouble(8, team.getHomeZ());
                ps.setFloat(9, team.getHomeYaw());
                ps.setFloat(10, team.getHomePitch());
            } else {
                ps.setNull(5, Types.VARCHAR);
                ps.setNull(6, Types.DOUBLE);
                ps.setNull(7, Types.DOUBLE);
                ps.setNull(8, Types.DOUBLE);