Tournament Manager

作者:rebot | 分类:模组

价格:0 墨喵币 下载量:0 点赞:0 版本 v0.4.0
本资源为搬运资源,原资源地址: https://modrinth.com/mod/tournament-manager
资源信息

Minecraft 版本: 26.1.2

平台: paper

资源介绍

_Request version updates here!_

TournamentManager

Orchestrates tournaments using any minigame plugin that implements the MinigameProvider interface.

Overview

TournamentManager is a Paper plugin that adds tournament-level organization on top of existing minigame plugins (Spleef, TeamDeathmatch, or any custom plugin). Instead of running games directly, it discovers MinigameProvider implementations at runtime via Bukkit's ServicesManager and delegates matches to them.

No hard dependency on any specific minigame — the plugin is fully generic. Any plugin that implements MinigameProvider can be used.

How It Works

  1. Minigame plugins (Spleef, TDM, etc.) implement the MinigameProvider interface and register it via ServicesManager.
  2. TournamentManager discovers all providers on startup and displays them in the admin GUI.
  3. Admin creates a tournament and selects which installed minigame to use.
  4. When matches are ready, the tournament calls provider.createMatch() to delegate the game.
  5. When the game ends, the provider fires a MatchCompleteEvent.
  6. TournamentManager receives the event, determines the winner, and advances the bracket.

Dependencies

Dependency Type Description
Paper API Hard Minecraft server API

Minigame providers (Spleef, TeamDeathmatch, etc.) are discovered at runtime — no compile-time dependency.

Supported Formats

  • Single Elimination — classic bracket, lose and you're out.
  • Swiss System — play a set number of rounds, best overall record wins.

Tournament Lifecycle

  1. Admin creates a tournament (via GUI or command).
  2. Players join via GUI (solo or pre-made teams).
  3. Admin starts the tournament.
  4. Plugin creates matches — delegates actual games to the chosen minigame provider.
  5. Results come back via MatchCompleteEvent from the provider.
  6. Plugin advances bracket / updates Swiss standings.
  7. Champion crowned, stats recorded.

GUIs

Admin

  • Main Menu — Create Tournament, Manage Tournaments, Installed Minigames
  • Create Tournament — Configure name, format, minigame provider, team size, max teams
  • Manage Tournaments — Start, Cancel, Force End, View Bracket/Standings, View Teams
  • Bracket View — Visual bracket tree by round
  • Swiss Standings — Ranked table with win/loss records
  • Installed Minigames — Shows all available providers and their arenas

Player

  • Open Tournaments — Paginated list of joinable tournaments
  • Tournament Details — Info, Join/Leave, View Bracket/Standings
  • My Matches — Current/upcoming matches
  • Match History — Past matches with W/L indicators

Commands

Command Description
/tournament Open player GUI (aliases: /tourney, /t)
/tournament admin Open admin GUI
/tournament create Open create tournament GUI
/tournament join <id> Join a tournament by ID
/tournament leave <id> Leave a tournament
/tournament start <id> Start a tournament (admin)
/tournament cancel <id> Cancel a tournament (admin)

Permissions

Permission Default Description
tournament.admin op Admin commands and management GUIs
tournament.player true Join and view tournaments

Creating a MinigameProvider

Any plugin can integrate with TournamentManager by implementing the MinigameProvider interface:

public class MyGameProvider implements MinigameProvider {
    @Override public String getPluginName() { return "MyGame"; }
    @Override public String getDisplayName() { return "MyGame"; }
    @Override public Material getIcon() { return Material.DIAMOND_SWORD; }
    @Override public boolean isEnabled() { return plugin.isEnabled(); }
    @Override public List<String> getAvailableArenas() { return List.of("arena1"); }

    @Override
    public boolean createMatch(String arena, List<UUID> team1,
                               List<UUID> team2, String matchId) {
        // Start your game here
        return true;
    }

    @Override public void cancelMatch(String matchId) { /* cleanup */ }
}

Register it in your plugin's onEnable():

getServer().getServicesManager().register(
    MinigameProvider.class, myProvider, this, ServicePriority.Normal
);

When the game ends, fire a MatchCompleteEvent:

MatchCompleteEvent event = new MatchCompleteEvent(
    getPluginName(), matchId, winningPlayerUuids, arena, false);
Bukkit.getPluginManager().callEvent(event);
下载与版本
评论(0)
请 登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

赞助作者

请 登录 后赞助作者。

🔥 相关推荐
LookAngle

价格:0 墨喵币
下载量:0

查看详情
Cookies!

价格:0 墨喵币
下载量:0

查看详情
Galaxyspace UI

价格:0 墨喵币
下载量:0

查看详情
Boya's Enderman

价格:0 墨喵币
下载量:0

查看详情