Meera Pandey

IDENTITY SMP

Minecraft Paper/Spigot Plugin — Part 1

  1. CORE GAME CONCEPT

Create a complete, production-ready Minecraft Paper/Spigot plugin called Identity SMP.

Identity SMP is a long-term social deduction, survival, investigation, deception, stealth, and voting-based SMP system.

This is NOT a normal minigame where players simply fight each other.

The core gameplay is:

Hidden Identity + Tasks + Investigation + Trust + Suspicion + Secret Kills + Voting + Survival

---

  1. ROLE ASSIGNMENT

A normal Identity SMP round/game session supports exactly:

  • 10 active players
  • 9 Detectives
  • 1 Spy

The Spy is randomly selected.

Players must never receive a public announcement revealing who the Spy is.

Each player receives exactly ONE Identity Card.

There are two internal card types:

  • Detective Identity Card
  • Spy Identity Card

However, these cards must look 100% identical to players.

The Spy's card must NOT visually reveal that it is a Spy card.

The Detective's card must NOT visually reveal that it is a Detective card.

---

  1. IDENTICAL CARD SYSTEM

Both Identity Cards must use the same:

  • Item type
  • Item name
  • Display name
  • Lore
  • CustomModelData
  • Texture/model
  • Enchant appearance
  • Visible metadata

Example visible name:

"[ IDENTITY CARD ]"

Do NOT display:

"SPY"

or

"DETECTIVE"

on the visible card.

The actual role must be stored internally by the plugin.

If:

  • The Spy holds their card in their hand
  • A Detective holds their card in their hand
  • A player looks at another player's card

there must be no visual difference.

Players cannot identify the Spy simply by looking at the card.

---

  1. CARD PROTECTION

Players must NOT be able to use another player's Identity Card to discover their role.

Prevent:

  • Card trading
  • Card dropping
  • Card stealing
  • Card duplication
  • Card copying
  • Card transferring
  • Forced card insertion
  • Role extraction
  • NBT inspection through normal gameplay
  • Exploiting the card system
  • Using glitches to reveal hidden role data

Cards should be bound to:

  • Player UUID
  • Current game ID
  • Internal role data

If a duplicated or invalid card is detected, invalidate it and log the event.

Normal players must not have any command that reveals another player's role.

---

  1. DETECTIVE ROLE

There are normally 9 Detectives.

The Detectives' main objective is:

«Find the real Spy before the Spy eliminates everyone.»

Detectives do NOT begin with all abilities unlocked.

Their abilities must be earned through difficult objectives/tasks.

---

  1. DETECTIVE TASK SYSTEM

Every Detective receives an Identity Objective.

Do NOT call it:

"Detective Task"

because this could expose the player's role.

Use a neutral name such as:

"IDENTITY OBJECTIVE"

Tasks should not be extremely easy.

They should require actual gameplay.

Possible task categories:

  • Exploration
  • Mining
  • Crafting
  • Finding a hidden location
  • Collecting specific items
  • Visiting multiple locations
  • Completing a parkour route
  • Surviving for a certain period
  • Interacting with specific blocks
  • Finding hidden objects
  • Completing a multi-step objective

Tasks should be configurable.

Example:

tasks: enabled: true difficulty: HARD same-task-system-for-all-roles: true

IMPORTANT:

The Spy should also receive a task from the same task system.

This prevents players from saying:

«"Only Detectives get tasks, so this player must be a Detective."»

The Spy receives an objective too.

However:

The Spy does NOT need to complete the task to unlock Spy abilities.

The Spy's abilities are already available from the beginning.

---

  1. DETECTIVE ABILITY SYSTEM

Detective abilities begin locked.

Example status:

"SPY DETECTOR: LOCKED"

After completing the required Identity Objective:

"SPY DETECTOR: READY"

The plugin should privately notify the player.

Do NOT announce task completion publicly.

Do NOT broadcast:

"Player X unlocked Spy Detector!"

---

  1. SPY DETECTOR

The primary Detective ability is:

SPY DETECTOR

Default settings:

detection-range: 20 detection-duration: 3 detection-cooldown: 3

When a Detective activates Spy Detector:

  • Check for the Spy within 20 blocks.
  • If the Spy is inside the range:

- Make the Spy glow for 3 seconds.

  • If the Spy is outside the range:

- Do nothing.

  • Do NOT reveal the Spy's coordinates.
  • Do NOT give distance information.
  • Do NOT provide a compass direction.
  • Do NOT show an arrow pointing toward the Spy.

The ability only answers:

«Is the Spy currently within detection range?»

The Detective still needs to be smart enough to determine what to do with that information.

---

  1. SPY ROLE

Exactly one player becomes the Spy.

The Spy's objective:

«Eliminate the Detectives while remaining unidentified.»

The Spy starts with abilities unlocked.

Example:

SPY ABILITIES

Invisible Movement: READY Invisible Kill: READY

The Spy does not need to complete their objective to activate these powers.

---

  1. SPY — INVISIBILITY

The Spy has an invisibility ability.

Default:

invisibility: duration: 10 cooldown: 30 particles: false

When activated:

  • Spy becomes invisible.
  • No obvious activation particles.
  • No public announcement.
  • Other players should not receive a notification that invisibility was activated.

The ability must have a configurable cooldown.

Kodari AI
KodariOct 1 at 1:20 pm 2
IdentitySMP
Identity SMP is a social deduction survival plugin for Minecraft Paper/Spigot. Ten players receive identical identity cards—nine detectives and one spy—with roles stored internally. Detectives complete neutral "Identity Objectives" to unlock abilities like Spy Detector, which glows the spy if within range. The spy starts with invisibility and kill abilities. Card protection prevents trading, dropping, or duplication. Configurable tasks, abilities, and ranges via YAML. No public role reveals; all feedback is private. Voting, investigation, and stealth mechanics drive the hidden-identity gameplay loop.
  1. Set up the Paper/Spigot plugin, commands, and configurable objectives.

  2. Implement private role assignment and identical, UUID/game-bound identity cards with transfer and duplication protection.

  3. Add objective progress, the detective detector, and the spy’s particle-free invisibility ability.

Created the Identity SMP Paper/Spigot plugin foundation with:

  • Exactly 10-player sessions: 9 Detectives and 1 randomly selected Spy, with roles sent privately.

  • Identical identity cards bound to their owner and game, with transfer, drop, pickup, and duplicate protections.

  • Configurable neutral objectives for both roles, plus the Detective Spy Detector and Spy invisibility ability.

  • /identity start, stop, status, objective, detect, and invisible commands.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
11 1,184
src/main/java/com/kodari/identitysmp/IdentitySMPPlugin.java
package com.kodari.identitysmp;

import com.kodari.identitysmp.ability.AbilityService;
import com.kodari.identitysmp.card.CardService;
import com.kodari.identitysmp.command.IdentityCommand;
import com.kodari.identitysmp.game.GameManager;
import com.kodari.identitysmp.listener.IdentityListener;
import com.kodari.identitysmp.task.TaskManager;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

public final class IdentitySMPPlugin extends JavaPlugin {
    private GameManager gameManager;
    private CardService cardService;
    private TaskManager taskManager;
    private AbilityService abilityService;

    @Override
    public void onEnable() {
        saveDefaultConfig();

        cardService = new CardService(this);
        taskManager = new TaskManager(this);
        gameManager = new GameManager(this, cardService, taskManager);
        abilityService = new AbilityService(this, gameManager, taskManager);

        Bukkit.getPluginManager().registerEvents(
                new IdentityListener(gameManager, cardService, taskManager), this);
        getCommand("identity").setExecutor(
                new IdentityCommand(gameManager, taskManager, abilityService));

        Bukkit.getScheduler().runTaskTimer(this, () -> {
            taskManager.tickSurvival();
            gameManager.auditCards();
        }, 20L, 20L);
    }

    @Override
    public void onDisable() {
        if (abilityService != null) {
            abilityService.reset();
        }
        if (gameManager != null) {
            gameManager.stopGame();
        }
    }
}