.krzysiooo

Make me a plugin for minecraft survival games

Kodari AI
KodariJan 24 at 11:41 pm 14,384 (v2)

I’ll create a comprehensive Survival Games plugin with multi-arena support, chest management, and full game flow.

SurvivalGames
A complete survival games plugin featuring multi-arena support with lobby system, automated chest spawning and refills, countdown timers, spectator mode, deathmatch border mechanics, win detection, and kill tracking. Includes arena setup commands, configurable game settings, and player statistics.

Plugin created successfully! Here’s what you have:

Features:

  • Multi-arena support with independent games

  • Lobby system with automatic countdown when minimum players join

  • Configurable game phases (waiting, countdown, active, deathmatch, ending)

  • Chest scanning and automatic loot filling with rarity tiers (common/rare/epic)

  • Periodic chest refills during the game

  • Invincibility period at game start

  • Automatic deathmatch phase with world border shrinkage

  • Spectator mode for eliminated players

  • Win detection and celebration

  • Full admin commands for arena setup

Commands:

  • /sg join <arena> - Join a game

  • /sg leave - Leave current game

  • /sg list - View all arenas

  • /sg create <arena> - Create new arena

  • /sg setlobby <arena> - Set lobby spawn

  • /sg addspawn <arena> - Add player spawn points

  • /sg setdeathmatch <arena> - Set deathmatch center

  • /sg scanchests <arena> - Auto-detect chests in world

  • /sg enable/disable <arena> - Toggle arena

Setup Guide:

  1. Create an arena: /sg create arena1

  2. Set lobby: /sg setlobby arena1

  3. Add spawn points (24+ recommended): /sg addspawn arena1

  4. Set deathmatch center: /sg setdeathmatch arena1

  5. Place chests around the map, then: /sg scanchests arena1

  6. Enable: /sg enable arena1

  7. Players join with: /sg join arena1

All settings are configurable in config.yml including timers, player counts, and loot tables!

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
13 1,202
src/main/java/com/survivalgames/SurvivalGamesPlugin.java
package com.survivalgames;

import com.survivalgames.arena.ArenaManager;
import com.survivalgames.commands.SGCommand;
import com.survivalgames.config.ConfigManager;
import com.survivalgames.listeners.PlayerListener;
import com.survivalgames.listeners.GameListener;
import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class SurvivalGamesPlugin extends JavaPlugin {
    
    private ConfigManager configManager;
    private ArenaManager arenaManager;
    
    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        this.configManager = new ConfigManager(this);
        this.arenaManager = new ArenaManager(this);
        
        getCommand("sg").setExecutor(new SGCommand(this));
        
        getServer().getPluginManager().registerEvents(new PlayerListener(this), this);
        getServer().getPluginManager().registerEvents(new GameListener(this), this);
        
        getLogger().info("SurvivalGames has been enabled!");
    }
    
    @Override
    public void onDisable() {
        if (arenaManager != null) {
            arenaManager.shutdown();
        }
        getLogger().info("SurvivalGames has been disabled!");
    }
}