gplays0532_93384

Project Name: VertexNexus (VN)

Developer / Owner: Aarav Singh (aka .ujjwalplaysop43)

Target Platforms: Paper, Spigot, Purpur, and Folia Supported Versions: 1.20.x – 1.21.x

Description:

VertexNexus is a high-performance Minecraft server utility plugin that includes a multi-stage KeyAll reward system and an advanced AFK Zone reward system. The plugin must be optimized for performance, support Folia threading, and follow a clean Object-Oriented code architecture.

=====================================================

  1. GLOBAL 4-STAGE KEYALL SYSTEM

=====================================================

This system distributes rewards to all online players automatically.

Stage Rotation:

Stage 1 → Stage 2 → Stage 3 → Stage 4 → Reset to Stage 1

Each stage must support:

  • interval_seconds
  • console_commands
  • broadcast_message
  • title_message
  • sound_effect
  • particle_effects (optional)

Example commands:

crates keyall vote 1 crates keyall rare 1 eco give %player% 500

Execution Logic:

When the timer reaches zero:

  1. Run all console commands
  2. Broadcast message to server
  3. Play title and sound (if enabled)
  4. Switch to the next stage

Persistence System:

Save runtime progress in data.yml

current_keyall_stage: remaining_keyall_time:

After server restart the timer must resume from the saved values.

Admin Commands:

/vn keyall now Instantly trigger current stage

/vn keyall skip Skip to next stage

/vn keyall pause Pause the timer

/vn keyall resume Resume timer

Optional Features:

Random reward pools Chance based rewards Title notifications Sound alerts Particles Discord webhook integration

=====================================================

  1. ADVANCED AFK ZONE SYSTEM

=====================================================

This system rewards players who stay inside a specific AFK area.

The AFK system runs independently from the KeyAll system.

Stage Cycle:

AFK Stage 1 → Stage 2 → Stage 3 → Stage 4 → Reset

Each stage must support:

interval_seconds commands title actionbar sound particles

Commands must only run for players inside the AFK zone.

Example command:

eco give %player% 100

=====================================================

  1. AFK ZONE SELECTION SYSTEM

=====================================================

Admins can define AFK zones using a wand tool.

Command:

/vn wand

Item:

Blaze Rod

Usage:

Left Click → Set Point 1 Right Click → Set Point 2

This creates a 3D cuboid region.

Save zone command:

/vn setzone

Zones must be saved in:

zones.yml

=====================================================

  1. AFK ZONE VISUAL FEEDBACK

=====================================================

When a player enters the AFK zone:

Show Title:

§b§lVERTEX §fAFK Zone

Display a BossBar with a timer.

Example BossBar:

AFK Rewards in: 04:32 (Stage 2)

When the player leaves the zone:

BossBar disappears AFK reward timer stops for that player

Optional:

ActionBar timer Particle circle around zone Entry/Exit sound

=====================================================

  1. ANTI AFK FARMING SYSTEM

=====================================================

Prevent players from abusing AFK rewards.

Include detection for:

Player movement Jump detection Mouse rotation detection Optional captcha system

If a player stays completely inactive rewards should pause.

Example config:

anti_afk: enabled: true required_movement: true min_rotation: 10

=====================================================

  1. PLACEHOLDERAPI SUPPORT

=====================================================

Create a PlaceholderManager class.

Register placeholders:

%vn_keyall_timer% %vn_keyall_stage%

%vn_afk_timer% %vn_afk_stage%

%vn_afk_players% %vn_afk_total_rewards%

Timers must display in MM:SS format.

Example:

05:30 02:15

=====================================================

  1. COMMAND SYSTEM

=====================================================

Main command:

/vn

Subcommands:

/vn wand /vn setzone /vn reload /vn info

/vn keyall now /vn keyall skip /vn keyall pause /vn keyall resume

Permissions:

vertexnexus.admin vertexnexus.keyall vertexnexus.afk

=====================================================

  1. CONFIGURATION FILES

=====================================================

The plugin must generate the following files:

config.yml data.yml zones.yml messages.yml

Example configuration:

keyall: stage1: interval_seconds: 600 broadcast: "&aKeyAll Stage 1 activated!" commands: - "crates keyall vote 1"

afk: stage1: interval_seconds: 300 commands: - "eco give %player% 100"

=====================================================

  1. FOLIA COMPATIBILITY

=====================================================

The plugin must be 100% Folia compatible.

Do NOT use:

Bukkit.getScheduler()

Instead use:

FoliaLib or Bukkit.getGlobalRegionScheduler()

KeyAll and AFK timers must run on separate loops.

=====================================================

  1. REQUIRED CLASS STRUCTURE

=====================================================

The code must be separated into these classes:

Main Handles plugin startup and initialization

ZoneManager Handles AFK zones and player detection

CycleHandler Handles stage timers and rotation logic

PlaceholderManager Handles PlaceholderAPI hooks

CommandManager Handles all /vn commands

=====================================================

  1. CREDITS COMMAND

=====================================================

Command:

/vn info

Output:

VertexNexus Plugin Developed by Aarav Singh (aka .ujjwalplaysop43)

=====================================================

  1. OPTIONAL ADVANCED FEATURES

=====================================================

AFK Leaderboard Top players by AFK time

INVENTORY GUI Menu

/vn menu

Shows:

Current stages Timers AFK players

Multiple AFK Zones

Allow multiple zones instead of just one.

Random Reward Pools

Example:

chance_rewards: - chance: 20 command: "give %player% diamond 1"

===================================================== FINAL INSTRUCTION FOR AI DEVELOPER =====================================================

Write the plugin using a clean Object-Oriented architecture.

Ensure:

High performance Folia compatibility Efficient timer system Proper class separation Readable and documented code

The final plugin must compile successfully and run on:

Paper Spigot Purpur Folia

Kodari AI
KodariMar 8 at 12:33 pm 22,570 (v2)

I’ll create VertexNexus, a high-performance multi-stage KeyAll and AFK Zone reward system with full Folia compatibility.

VertexNexus
A high-performance server utility plugin featuring a 4-stage global KeyAll reward system and advanced AFK Zone rewards. Includes automatic stage rotation, persistent timers, zone selection tools with visual feedback, anti-AFK detection, PlaceholderAPI support, and full Folia compatibility. Admin commands allow instant triggers, stage skipping, and pause/resume control. Optimized for Paper, Spigot, Purpur, and Folia servers (1.20.x - 1.21.x).

Let me create the complete VertexNexus plugin with all required systems.

VertexNexus plugin created successfully with all required features:

Core Systems Implemented:

  • ✅ 4-stage KeyAll system with automatic rotation and persistence

  • ✅ 4-stage AFK Zone reward system with independent timers

  • ✅ Wand-based zone selection (Blaze Rod) with cuboid region support

  • ✅ BossBar timer display for AFK players showing remaining time and stage

  • ✅ Anti-AFK detection tracking movement and rotation

  • ✅ PlaceholderAPI integration with 6 placeholders

  • ✅ Full Folia compatibility using FoliaLib for all scheduling

  • ✅ Persistent timer state across restarts (data.yml)

  • ✅ Admin commands for instant trigger, skip, pause/resume

  • ✅ Zone entry/exit titles, sounds, and visual feedback

  • ✅ Cross-version support (1.20.x - 1.21.x) using XSeries

All managers use @Getter for clean access, data classes use @Data for automatic getters/setters, and the plugin supports Paper, Spigot, Purpur, and Folia platforms.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
manifest.kod
Code
28 1,628
src/main/java/com/vertexnexus/plugin/VertexNexus.java
package com.vertexnexus.plugin;

import com.tcoded.folialib.FoliaLib;
import com.vertexnexus.plugin.commands.CommandManager;
import com.vertexnexus.plugin.cycle.AFKCycle;
import com.vertexnexus.plugin.cycle.KeyAllCycle;
import com.vertexnexus.plugin.listeners.InteractListener;
import com.vertexnexus.plugin.listeners.PlayerJoinListener;
import com.vertexnexus.plugin.listeners.PlayerMoveListener;
import com.vertexnexus.plugin.listeners.PlayerQuitListener;
import com.vertexnexus.plugin.managers.ConfigManager;
import com.vertexnexus.plugin.managers.DataManager;
import com.vertexnexus.plugin.managers.MessageManager;
import com.vertexnexus.plugin.managers.ZoneManager;
import com.vertexnexus.plugin.papi.PlaceholderManager;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class VertexNexus extends JavaPlugin {
    private FoliaLib foliaLib;
    private ConfigManager configManager;
    private DataManager dataManager;
    private MessageManager messageManager;
    private ZoneManager zoneManager;
    private KeyAllCycle keyAllCycle;
    private AFKCycle afkCycle;

    @Override
    public void onEnable() {
        foliaLib = new FoliaLib(this);

        configManager = new ConfigManager(this);
        dataManager = new DataManager(this);
        messageManager = new MessageManager(this);
        zoneManager = new ZoneManager(this, foliaLib);

        if (configManager.isKeyAllEnabled()) {
            keyAllCycle = new KeyAllCycle(this, foliaLib);
            keyAllCycle.start();
            getLogger().info("KeyAll cycle started on stage " + keyAllCycle.getCurrentStage());
        }

        if (configManager.isAFKEnabled()) {
            afkCycle = new AFKCycle(this, foliaLib);
            afkCycle.start();
            getLogger().info("AFK cycle started on stage " + afkCycle.getCurrentStage());
        }

        CommandManager commandManager = new CommandManager(this, foliaLib);
        getCommand("vn").setExecutor(commandManager);

        Bukkit.getPluginManager().registerEvents(new InteractListener(this, foliaLib), this);
        Bukkit.getPluginManager().registerEvents(new PlayerMoveListener(this, foliaLib), this);
        Bukkit.getPluginManager().registerEvents(new PlayerJoinListener(this, foliaLib), this);
        Bukkit.getPluginManager().registerEvents(new PlayerQuitListener(this), this);

        if (Bukkit.getPluginManager().getPlugin("PlaceholderAPI") != null) {
            new PlaceholderManager(this).register();
            getLogger().info("PlaceholderAPI integration enabled");
        }

        getLogger().info("VertexNexus v1.0.0 by Aarav Singh enabled!");
        getLogger().info("Folia Support: " + (foliaLib.isFolia() ? "Yes" : "No (Spigot/Paper mode)"));
    }

    @Override
    public void onDisable() {
        if (keyAllCycle != null) {
            keyAllCycle.stop();
        }

        if (afkCycle != null) {
            afkCycle.stop();
        }

        if (foliaLib != null) {
            foliaLib.getScheduler().cancelAllTasks();
        }

        getLogger().info("VertexNexus disabled. States saved.");
    }
}