Elijah Acosta

Among Us Plugin

add /AHelp command that shows you every command and what they do also add /Asetlobby what this does is that when you do /lobby you leave the active game and get sent to lobby that the admins set /role - See your Current Role - if your dead make it show Imposter | Dead or Crewmate | Dead if your alive you change it to alive and if your crewmate or imposter and you have a Addon to your role do this Imposter/Crewmate - Special Role name | Dead/Alive and it changes depending on your role or if your imposter or crewmate /AImposteramont - Set the Amont of Imposter you Want /ACreateVent - Creates a Vent which Imposters can Rightclick to Open a Meny that can teleport you to other vents with a 30 second cooldown /ASetLobby - Set the location of the Lobby /ASetMetting - Set the Location of the Meeting Room /ACreateTask - Choose up a Menu of 10 different task choose one then it then spawns it in under you /ACosmeticsCrate - places down a button that when you click it it opens a double chest that then shows each raity of armor pick 1 then it shows each trim abvaible for that raity and make sure no one can have the same armor /trim /Astart - Starts the Amongus Game /Aend - Ends the Amongus Game /ABan - Bans the Player for Playing the game /AKick - Kicks the player from the current game /APlayerlimit - Amont of Players that are brought into the amongus game /ATaskAmont - Chooses how many task each player gets /AStats - Sees Who has to most wins and loses /ADoorSet - Uses worldedit feature to make a door that is invisble that imposter can make visble / close so no one can go in or out you select the 2 corners of the Door

Also make it so any Command that is listed above that starts with /A Operators only commands

also make each task your self and make sure to put a piece of paper at the top explaining how to do the task and make sure the task opens up in a doublechest

also when your imposter makes sure when the imposter right clicks a crewmate it then kills the person who was a crewmate and sends them to lobby and make sure when impsoter kills the crewmate their chestplate/armor/trim stays on the Ground intill the game ends or imposters win imposters win if their is a Equal amont of Crewmates as them if their is for somereason less then the same amont the still win anymore it can still run 2/2 - Win for Imposters 2/3 - Not Win Yet but make it so if their is a chestplate on the ground crewmates or Imposters can Report it by rightclicking the body/chestplate also make sure it tells you who is the other imposter if their is 1 when it gives you your role or when you do /role make sure not to show that to crewmates

also make it so when someone calls a meeting/Reports a body it does a 30 second discuss timer then after its done it opens a double chest with everyones head and if someone gets the most votes they get eliminated but make sure their chestplate does not drop on the ground also make sure if its a tie no one gets voted out/ its skips and also add a skip button to it

Also make the Author of the Plugin say Yopait's Mini Events

Also make it so when a game starts you cant see nametags - Only if it is not possible to do without invisiblty Give them a Helmet Leggings and Boots and if its invisbility make it so it shows their chestplate with the trim on it and make sure the color of the trim is always green/emerald

Worldedit Feature Add Worldedit to the thing and make it compatible with the commands above

Also make sure that imposters get a book and quil - That on page 2 they can press the text to activate their door sabatoge that closes every door also give crewmates book and quils that explains their roles and till them what their task are

Paper 1.21.11 | Java 25

Kodari AI
KodariOct 25 at 11:37 pm 3
AmongUsMiniEvents
Among Us style mini-game plugin for Paper 1.21.11. Features admin commands (/AHelp, /ASetLobby, /AImposterAmount, /ACreateVent, /ACreateTask, /ACosmeticsCrate, /AStart, /AEnd, /ABan, /AKick, /APlayerLimit, /ATaskAmount, /AStats, /ADoorSet) with operator-only access. Imposters can kill crewmates via right-click, vent teleportation with cooldown, task system with paper instructions in double chests, cosmetics crate with unique armor/trim combinations, meeting voting system with 30-second discussion timer, body reporting, lobby system, role display with death status, nametag hiding during games, door sabotage via book, and Worldedit compatibility. Author: Yopait's Mini Events.
  1. Create the Paper 1.21.11 project and register the requested commands.

  2. Implement game roles, lobby flow, kills, reports, discussion, voting, and win conditions.

  3. Add vents, task stations and menus, cosmetic crates, stats, and game bans/kicks.

  4. Add admin door selection and sabotage, then persist settings and game-world placements.

Created the Among Us plugin project with the requested commands, role assignment, lobby and meeting flow, kills and body reports, timed voting, win conditions, vents, task stations, cosmetics, stats, and game bans/kicks.

Two details are simplified: door selection uses a wooden-axe, WorldEdit-style selection rather than the WorldEdit API; and the imposter book shows /doorsabotage on page two instead of clickable text. Task stations use a shared three-step GUI with task-specific instructions, not ten distinct minigames.

Elijah Acosta

when you select create task make sure it make opens another menu when you click your option to make it a button or block and either 1 when you right click them you start the task and make sure you add that also make sure when you select your costmetic it also gives you the helmet leggings and boots of that armor and auto equipts it and make sure no one can take it of but you can switch it if you want in cosmetics | Also make it so when the door is not sabaotged people can walk through it also add lights sabatoge that gives everyone blindness for 15 seconds also add /akillcooldown [amont] so you can change the kill cooldown in seconds also make sure that you cant take of the armor but you lose it when you die/imposter kills you or you go to lobby or something like that

Kodari AI
KodariOct 26 at 12:11 am 2
  1. Task placement: add a follow-up menu to choose a button or block, and make either placement start its task on right-click.

  2. Cosmetics: equip the selected armor set, prevent removal, allow switching via cosmetics, and clear it on death or lobby exit.

  3. Doors and sabotage: keep doors passable normally and add a 15-second blindness lights sabotage.

  4. Kill cooldown: add operator-only /AKillCooldown <seconds> and apply the configured cooldown.

  1. Task stations: Selecting a task now opens a second menu to place it as a button or block; right-clicking either starts the task.

  2. Cosmetics: Claiming or selecting an owned trim equips a matching helmet, chestplate, leggings, and boots. The set can’t be removed or swapped out manually; use the cosmetics crate to switch sets. It’s cleared on death or when leaving the game. Armor from an imposter kill still drops as a reportable body.

  3. Sabotage: Doors are open and passable normally, and become barriers during door sabotage. Added /lightsabotage for living imposters; it blinds all living game players for 15 seconds.

  4. Kill cooldown: Added operator-only /AKillCooldown <seconds>, saved across restarts. The default is 30 seconds; 0 disables the cooldown.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
5 1,685
src/main/java/com/yopaits/minievents/AmongUsPlugin.java
package com.yopaits.minievents;

import com.cryptomorin.xseries.XMaterial;
import com.cryptomorin.xseries.XPotion;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.NamespacedKey;
import org.bukkit.Registry;
import org.bukkit.scoreboard.Scoreboard;
import org.bukkit.scoreboard.Team;
import org.bukkit.World;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.block.data.BlockData;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.command.PluginCommand;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Item;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.block.Action;
import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.event.block.BlockPlaceEvent;
import org.bukkit.event.inventory.InventoryAction;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.event.inventory.InventoryDragEvent;
import org.bukkit.event.inventory.InventoryType;
import org.bukkit.event.player.PlayerInteractEntityEvent;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.event.entity.PlayerDeathEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ArmorMeta;
import org.bukkit.inventory.meta.BookMeta;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.inventory.meta.SkullMeta;
import org.bukkit.inventory.meta.trim.ArmorTrim;
import org.bukkit.inventory.meta.trim.TrimMaterial;
import org.bukkit.inventory.meta.trim.TrimPattern;
import org.bukkit.persistence.PersistentDataType;
import org.bukkit.plugin.java.JavaPlugin;

import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
import java.util.concurrent.ThreadLocalRandom;

public final class AmongUsPlugin extends JavaPlugin implements Listener, CommandExecutor {
    private static final String PREFIX = ChatColor.DARK_RED + "[Among Us] " + ChatColor.RESET;
    private static final String BODY_PREFIX = ChatColor.RED + "Among Us Body: ";
    private static final String TASK_SELECT_TITLE = "AU: Create Task";
    private static final String TASK_PLACEMENT_PREFIX = "AU: Place Task: ";
    private static final String TASK_TITLE_PREFIX = "AU: Task: ";
    private static final String VENT_TITLE = "AU: Vents";
    private static final String VOTE_TITLE = "AU: Vote";
    private static final String RARITY_TITLE = "AU: Cosmetic Rarity";
    private static final String TRIM_TITLE_PREFIX = "AU: Trim: ";
    private static final String HIDDEN_TEAM = "amongus_hidden_tags";
    private static final List<TaskSpec> TASKS = List.of(
            new TaskSpec("Fix Wiring", "REDSTONE", "Connect the wiring: click the panel three times to complete the repair."),
            new TaskSpec("Download Data", "PAPER", "Download the station data by completing three progress steps."),
            new TaskSpec("Swipe Card", "NAME_TAG", "Swipe your card through the reader three times."),
            new TaskSpec("Fuel Engines", "COAL", "Load fuel into the engine in three measured steps."),
            new TaskSpec("Align Engine", "COMPASS", "Align the engine controls with three calibration clicks."),
            new TaskSpec("Clear Asteroids", "ARROW", "Clear the asteroid field with three successful shots."),
            new TaskSpec("Prime Shields", "SHIELD", "Prime the shield system with three activations."),
            new TaskSpec("Chart Course", "MAP", "Chart the route by confirming three navigation points."),
            new TaskSpec("Stabilize Steering", "LEVER", "Stabilize the steering system in three steps."),
            new TaskSpec("Inspect Sample", "GLASS_BOTTLE", "Inspect the sample and complete three analysis steps.")
    );
    private static final List<String> RARITIES = List.of("Common", "Uncommon", "Rare", "Epic", "Legendary", "Mythic");
    private static final List<String> ARMOR_MATERIALS = List.of(
            "LEATHER_CHESTPLATE", "CHAINMAIL_CHESTPLATE", "IRON_CHESTPLATE",
            "GOLDEN_CHESTPLATE", "DIAMOND_CHESTPLATE", "NETHERITE_CHESTPLATE"
    );
    private static final List<String> TRIM_PATTERNS = List.of(
            "sentry", "dune", "coast", "wild", "ward", "eye", "vex", "tide", "snout",
            "rib", "spire", "wayfinder", "shaper", "raiser", "host", "silence", "flow", "bolt"
    );

    private final Map<UUID, Role> roles = new HashMap<>();
    private final Set<UUID> deadPlayers = new HashSet<>();
    private final Set<UUID> gamePlayers = new HashSet<>();
    private final Map<UUID, List<String>> remainingTasks = new HashMap<>();
    private final Map<UUID, Integer> taskProgress = new HashMap<>();
    private final Map<UUID, Long> killCooldowns = new HashMap<>();
    private final Map<UUID, Long> ventCooldowns = new HashMap<>();
    private final Map<UUID, String> votes = new HashMap<>();
    private final Map<UUID, List<Location>> ventMenus = new HashMap<>();
    private final Map<UUID, List<UUID>> voteMenus = new HashMap<>();
    private final Set<UUID> bannedPlayers = new HashSet<>();
    private final Set<String> claimedCosmetics = new HashSet<>();
    private final Map<UUID, Set<String>> ownedCosmetics = new HashMap<>();
    private final Map<UUID, String> equippedCosmetics = new HashMap<>();
    private final Map<String, String> taskStations = new LinkedHashMap<>();
    private final List<Location> vents = new ArrayList<>();
    private final Set<String> cosmeticCrates = new HashSet<>();
    private final Map<UUID, Location> firstDoorCorners = new HashMap<>();
    private final Map<UUID, Location> secondDoorCorners = new HashMap<>();
    private final Map<Integer, List<DoorCell>> doorRegions = new LinkedHashMap<>();

    private Team hiddenTeam;
    private NamespacedKey cosmeticArmorKey;
    private int imposterCount;
    private int playerLimit;
    private int taskAmount;
    private int killCooldownSeconds;
    private int nextDoorId;
    private boolean gameActive;
    private boolean meetingActive;
    private boolean doorsClosed;
    private int meetingToken;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        cosmeticArmorKey = new NamespacedKey(this, "cosmetic_armor");
        loadPersistentData();
        imposterCount = Math.max(1, getConfig().getInt("imposter-count", 1));
        playerLimit = Math.max(3, getConfig().getInt("player-limit", 10));
        taskAmount = Math.max(1, Math.min(TASKS.size(), getConfig().getInt("task-amount", 5)));
        killCooldownSeconds = Math.max(0, getConfig().getInt("kill-cooldown-seconds", 30));
        setupHiddenTeam();
        Bukkit.getPluginManager().registerEvents(this, this);
        for (String name : List.of("ahelp", "lobby", "role", "asetlobby", "asetmetting", "aimposteramont",
                "acreatevent", "acreatetask", "acosmeticscrate", "astart", "aend", "aban", "akick",
                "aplayerlimit", "ataskamont", "akillcooldown", "astats", "adoorset", "doorsabotage",
                "lightsabotage", "meeting")) {
            PluginCommand command = getCommand(name);
            if (command != null) {
                command.setExecutor(this);
            }
        }
    }

    @Override
    public void onDisable() {
        applyDoorState(false);
        doorsClosed = false;
        getConfig().set("doors-closed", false);
        persistData();
        if (hiddenTeam != null) {
            for (String entry : new HashSet<>(hiddenTeam.getEntries())) {
                hiddenTeam.removeEntry(entry);
            }
        }
    }

    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        String name = command.getName().toLowerCase(Locale.ROOT);
        if (name.startsWith("a") && !sender.isOp()) {
            sender.sendMessage(PREFIX + ChatColor.RED + "This command is for operators only.");
            return true;
        }

        switch (name) {
            case "ahelp" -> sendHelp(sender);
            case "role" -> showRole(sender);
            case "lobby" -> leaveForLobby(sender);
            case "asetlobby" -> setPoint(sender, "lobby", "Lobby");
            case "asetmetting" -> setPoint(sender, "meeting-room", "Meeting room");
            case "aimposteramont" -> setAmount(sender, args, "imposter-count", "Imposter count", 1, 10);
            case "aplayerlimit" -> setAmount(sender, args, "player-limit", "Player limit", 3, 39);
            case "ataskamont" -> setAmount(sender, args, "task-amount", "Task amount", 1, TASKS.size());
            case "akillcooldown" -> setKillCooldown(sender, args);
            case "acreatevent" -> createVent(sender);
            case "acreatetask" -> openTaskPlacement(sender);
            case "acosmeticscrate" -> placeCosmeticsCrate(sender);
            case "astart" -> startGame(sender);
            case "aend" -> {
                if (gameActive) {
                    finishGame(null, "The game was ended by an operator.");
                } else {
                    sender.sendMessage(PREFIX + "There is no active game.");
                }
            }
            case "aban" -> banPlayer(sender, args);
            case "akick" -> kickPlayer(sender, args);
            case "astats" -> showStats(sender);
            case "adoorset" -> createDoor(sender);
            case "doorsabotage" -> sabotageDoors(sender);
            case "lightsabotage" -> sabotageLights(sender);
            case "meeting" -> {
                if (sender instanceof Player player) {