B

Create a high-quality Minecraft Paper/Spigot plugin (Minecraft 1.21+) named "Prabhat's Score SMP".

Author: PrabhatPie

The plugin must be stable, optimized, and designed to prevent bugs, exploits, or glitches, especially in the scoring and task systems.

IMPORTANT:

All values, messages, tasks, timers, and settings must be fully configurable in files such as config.yml and tasks.yml so server owners can easily customize the plugin without editing the code.

--------------------------------- CORE SCORE SYSTEM ---------------------------------

Every player starts with 30 Score Points when they first join the server.

Requirements:

  • The player's Score must be visible to all players.
  • The score must appear in BOLD text directly below the player's nametag using a scoreboard or nametag display.
  • The score must update in real time whenever it changes.

Commands: /score Shows the player's current score.

/scoretop Shows the top 10 players with the highest scores.

All messages must be configurable in config.yml.

--------------------------------- DEATH PENALTY SYSTEM ---------------------------------

When a player dies:

  • The plugin automatically removes 10 Score.

Example message: "You died and lost 10 Score."

If a player's Score reaches 0 or below:

  • The player is automatically banned from the server.

Default ban duration: 30 days.

Ban message example: "You lost all your Score.

You are banned from Prabhat's Score SMP for 30 days.

Survive better next time!"

Both the score loss and ban duration must be editable in config.yml.

--------------------------------- TASK SYSTEM (ANTI-CHEAT DESIGN) ---------------------------------

Players can receive one random difficult task at a time.

Command: /task

When used, the player receives a written "Task Book" describing the task.

Players must NOT be able to manually complete tasks using commands.

The plugin must automatically detect and verify when a player completes their task using Minecraft event listeners.

Tasks must be configurable in tasks.yml.

--------------------------------- TASK TIME LIMIT SYSTEM ---------------------------------

Each player has a limited time to complete their assigned task.

Default time: 10 days.

If the player does NOT complete the task within the time limit:

  • The player is automatically banned.

Default ban duration: 20 days.

Ban message example: "You failed to complete your task in time.

You are banned from Prabhat's Score SMP for 20 days."

Both the time limit and ban duration must be configurable in config.yml.

The plugin must store the task start time and track time even if the server restarts.

--------------------------------- TASK TRACKING EXAMPLES ---------------------------------

Example Task 1:

Build 30 houses in the SMP spawn area.

Tracking system:

  • Detect block placements
  • Each house must contain:

- a door - a roof - minimum building blocks

Example Task 2:

Kill 4 different players.

Rules:

  • Must kill unique players
  • Same player kills do not count
  • Cooldown between kills to prevent farming

Example Task 3:

Craft 5 Netherite Armor Sets.

Track crafting of:

  • Netherite Helmet
  • Netherite Chestplate
  • Netherite Leggings
  • Netherite Boots

Tasks and requirements must be editable in tasks.yml.

--------------------------------- TASK PROGRESS SYSTEM ---------------------------------

Command: /task progress

Displays:

Current Task Progress Reward

Example:

Current Task: Kill 4 players Progress: 3/4 Reward: 50 Score

--------------------------------- TASK COMPLETION ---------------------------------

When the plugin detects task completion:

  • The player automatically receives Score.

Default reward: +50 Score.

Completion message example: "Task Completed! You earned 50 Score."

Reward amounts must be configurable.

--------------------------------- ANTI-EXPLOIT PROTECTION ---------------------------------

The plugin must prevent:

  • Fake building spam
  • Killing the same player repeatedly
  • Block place and break abuse
  • Alternate account farming

Solutions:

  • Track unique kills
  • Ignore fast place/break spam
  • Require structure checks
  • Store progress in persistent data

--------------------------------- ADMIN COMMANDS ---------------------------------

/score set <player> <amount> /score add <player> <amount> /score remove <player> <amount> /task reset <player> /scoresmp reload

Permission: scoresmp.admin

--------------------------------- DATA STORAGE ---------------------------------

Use SQLite or YAML to store:

playerScore activeTask taskProgress taskStartTime banTime

Data must auto-save.

--------------------------------- CONFIGURATION FILES ---------------------------------

config.yml should include editable options such as:

  • startingScore
  • deathScoreLoss
  • taskReward
  • taskTimeLimit
  • taskFailBanDuration
  • zeroScoreBanDuration
  • scoreboardDisplay
  • messages
  • cooldowns
  • anti-exploit settings

tasks.yml should include:

  • list of tasks
  • task requirements
  • rewards
  • difficulty
  • descriptions

--------------------------------- PERFORMANCE REQUIREMENTS ---------------------------------

  • Must support large SMP servers
  • Efficient event listeners
  • No laggy repeating tasks
  • Clean modular code
  • Async database saving

--------------------------------- GOAL OF THE PLUGIN ---------------------------------

Create a competitive survival SMP system where:

Players start with 30 Score Death reduces score Tasks reward score Score reaching 0 results in a 30-day ban Failing a task within the time limit results in a 20-day ban

All settings must be configurable through config files so server owners can easily customize the gameplay experience.

Kodari AI
KodariMar 13 at 1:49 pm 25,949 (v2)

I’ll plan all classes carefully before writing:

Classes & Dependencies:

  • PrabhatScoreSMP → main plugin, holds all managers

  • ConfigManager → loads config.yml + tasks.yml

  • PlayerData → data model (Lombok)

  • DataManager → YAML flat-file async storage

  • ScoreManager → score logic + bans

  • TaskManager → task assignment, progress, completion

  • BanManager → ban logic via Bukkit BanList

  • ScoreboardManager → below-name scoreboard display

  • ScoreCommand, TaskCommand, ReloadCommand → commands

  • PlayerJoinListener, DeathListener, TaskListener → events

  • TaskType (enum), Task (data class)

  • Full GUI framework from docs

PrabhatScoreSMP
A competitive survival SMP plugin where players start with 30 Score Points. Deaths deduct score; reaching 0 triggers a 30-day ban. Players receive random tasks tracked automatically via events — completing tasks rewards Score, while failing within the time limit triggers a 20-day ban. Score is displayed below nametags in real-time. All values, messages, timers, and tasks are fully configurable via config.yml and tasks.yml.

I need to fix a naming conflict — my ScoreboardManager class shares a name with Bukkit’s org.bukkit.scoreboard.ScoreboardManager. I’ll use the fully qualified Bukkit type inside the method.

Here’s a summary of everything that was built:


Plugin Structure

19 Java files across a clean modular package layout:

Layer
Files
Core
PrabhatScoreSMP
,
ConfigManager
Data
PlayerData
,
DataManager
(async YAML per-player files)
Managers
ScoreManager
,
TaskManager
,
BanManager
,
ScoreboardManager
Commands
ScoreCommand
,
ScoreTopCommand
,
TaskCommand
,
ReloadCommand
Listeners
PlayerJoinListener
,
DeathListener
,
TaskListener
Tasks
Task
,
TaskType
(enum)
GUI Framework
InventoryHandler
,
InventoryButton
,
InventoryGUI
,
GUIManager
,
GUIListener

Key Features Delivered

  • Score below nametag — Uses Bukkit BELOW_NAME scoreboard objective, updates in real-time on every change

  • Death penalty + zero-score ban — Configurable loss amount and ban duration; uses Bukkit’s native BanList with expiry date

  • Task system — 6 tasks in tasks.yml covering KILL_PLAYERS, CRAFT_ITEMS, PLACE_BLOCKS, CRAFT_NETHERITE_ARMOR; auto-detected via event listeners, never manually completable

  • Task Book — Players receive a written book with task details, reward, difficulty, and time limit

  • Task expiry — Async repeating check every 5 minutes; persists across restarts via taskStartTime in YAML

  • Anti-exploit — Kill cooldown per unique victim, block placement cooldown, no re-counting dead targets

  • Async saving — All data writes are dispatched off the main thread; bulk save on shutdown

  • Full tab-completion on all admin commands

  • 100% configurable — Every number, message, task requirement, and timer lives in config.yml or tasks.yml

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
26 1,719
src/main/java/com/prabhat/scoresmp/PrabhatScoreSMP.java
package com.prabhat.scoresmp;

import com.prabhat.scoresmp.commands.ReloadCommand;
import com.prabhat.scoresmp.commands.ScoreCommand;
import com.prabhat.scoresmp.commands.TaskCommand;
import com.prabhat.scoresmp.config.ConfigManager;
import com.prabhat.scoresmp.data.DataManager;
import com.prabhat.scoresmp.inventory.gui.GUIListener;
import com.prabhat.scoresmp.inventory.gui.GUIManager;
import com.prabhat.scoresmp.listeners.DeathListener;
import com.prabhat.scoresmp.listeners.PlayerJoinListener;
import com.prabhat.scoresmp.listeners.TaskListener;
import com.prabhat.scoresmp.managers.BanManager;
import com.prabhat.scoresmp.managers.ScoreManager;
import com.prabhat.scoresmp.managers.ScoreboardManager;
import com.prabhat.scoresmp.managers.TaskManager;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class PrabhatScoreSMP extends JavaPlugin {

    private ConfigManager configManager;
    private DataManager dataManager;
    private ScoreManager scoreManager;
    private TaskManager taskManager;
    private BanManager banManager;
    private ScoreboardManager scoreboardManager;
    private GUIManager guiManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        configManager = new ConfigManager(this);
        configManager.load();

        dataManager = new DataManager(this);
        dataManager.load();

        banManager = new BanManager(this);
        scoreboardManager = new ScoreboardManager(this);
        scoreManager = new ScoreManager(this);
        taskManager = new TaskManager(this);
        guiManager = new GUIManager();

        registerListeners();
        registerCommands();

        scoreboardManager.setupObjective();
        Bukkit.getOnlinePlayers().forEach(p -> {
            dataManager.loadPlayer(p.getUniqueId(), p.getName());
            scoreboardManager.updateScore(p);
        });

        taskManager.startExpiryCheckTask();

        getLogger().info("PrabhatScoreSMP enabled successfully!");
    }

    @Override
    public void onDisable() {
        dataManager.saveAll();
        scoreboardManager.cleanup();
        getLogger().info("PrabhatScoreSMP disabled. All data saved.");
    }

    private void registerListeners() {
        Bukkit.getPluginManager().registerEvents(new PlayerJoinListener(this), this);
        Bukkit.getPluginManager().registerEvents(new DeathListener(this), this);
        Bukkit.getPluginManager().registerEvents(new TaskListener(this), this);
        Bukkit.getPluginManager().registerEvents(new GUIListener(guiManager), this);
    }

    private void registerCommands() {
        ScoreCommand scoreCommand = new ScoreCommand(this);
        getCommand("score").setExecutor(scoreCommand);
        getCommand("score").setTabCompleter(scoreCommand);

        getCommand("scoretop").setExecutor(new com.prabhat.scoresmp.commands.ScoreTopCommand(this));

        TaskCommand taskCommand = new TaskCommand(this);
        getCommand("task").setExecutor(taskCommand);
        getCommand("task").setTabCompleter(taskCommand);

        ReloadCommand reloadCommand = new ReloadCommand(this);
        getCommand("scoresmp").setExecutor(reloadCommand);
        getCommand("scoresmp").setTabCompleter(reloadCommand);
    }

    public void reload() {
        reloadConfig();
        configManager.load();
        scoreboardManager.setupObjective();
        Bukkit.getOnlinePlayers().forEach(scoreboardManager::updateScore);
    }
}