MiniGameCore
MiniGameCore 是一个用于在 Minecraft Paper 服务器上管理小游戏大厅的核心插件。它负责处理游戏的托管、加入、开始和停止——并支持动态计分板、统计数据和多世界(Multiverse)兼容。
? 安装
- 从 Modrinth 或 Releases 页面下载最新的
.jar 文件。
- 将文件放入你的 Minecraft 服务器的
plugins/ 文件夹中。
- 如需权限管理,你可以选择使用 LuckPerms 等插件。
- 重启服务器一次。
? 命令与权限
别名:/p 对应 /party,/tc 对应 /teamchat
| 命令 |
描述 |
权限 |
/mg host <game> |
创建一个新的大厅 |
mgcore.host |
/mg join <lobby-id> |
加入大厅 |
mgcore.join |
/mg ready |
将你的状态设置为就绪 |
mgcore.ready |
/mg unready |
将你的状态设置为未就绪 |
mgcore.ready |
/mg confirm |
确认一项操作 |
mgcore.confirm |
/mg leave |
离开大厅或游戏 |
mgcore.leave |
/mg start |
手动开始游戏(如果允许) |
mgcore.start |
/mg spectate <lobby-id|player> |
以观察者身份加入游戏 |
mgcore.spectate |
/mg reload |
重新加载插件 |
mgcore.admin |
/mg stop <lobby-id> |
停止特定游戏 |
mgcore.admin |
/mg stopall |
停止所有活跃的游戏 |
mgcore.admin |
/mg ban <player> |
禁止玩家使用大多数 MiniGameCore 命令 |
mgcore.admin |
/mg version |
显示你正在使用的 MiniGameCore 版本 |
mgcore.use (默认) |
/party create <name> |
创建一个新的队伍 |
mgcore.party.create |
/party join <player> |
加入玩家的队伍 |
mgcore.party.join |
| /party leave | 离开你的队伍 | mgcore.party.join |
| /party invite <player> | 邀请一名玩家加入你的队伍 | mgcore.party.invite |
| /party deny | 拒绝一名玩家对你队伍的邀请 | mgcore.party.invite |
| /party list | 列出队伍成员 | mgcore.party.list |
| /teamchat <message> | 仅向你的团队发送消息 | mgcore.teamchat |
⚙️ 插件配置
插件配置文件位于文件夹:./plugins/MiniGameCore。主配置文件为 config.yml。
config.yml
示例配置:
available-games:
- Game1
- Game2
- Game3
banned-players:
- 2e0749e5-4ec0-4201-b58d-c4277014749c
- 337482fe-8a15-47f6-bea5-a84918a86393
keep-worlds: false
disable-scoreboard: false
keep-inventories-after-games: true
注意:如果 keep-worlds: true,插件会将它们移动到 ./plugins/MiniGameCore/ArchivedWorlds,而不是删除它们。
加载游戏世界 & 配置它们
游戏世界和配置文件所在的文件夹是 ./MiniGameCore。每个游戏世界的命名格式应为:<游戏名称>_world。如果你希望一个游戏包含多个地图,其他世界的命名格式为 <游戏名称>_world<索引>。世界配置文件名为 config.yml,应位于对应游戏的子文件夹中。
所有可用选项如下:
| 字段 |
描述 |
必填 / 默认值 |
name |
游戏的显示名称,例如在计分板或 /mg host 命令中显示 |
✅ 是 |
maxPlayers |
此游戏实例的最大玩家数量 |
✅ 是 |
teams |
队伍的最大数量(0 表示无队伍,可设置 2-8 支队伍) |
❌ 否(默认:0) |
minPlayers |
此游戏的最小玩家数量 |
❌ 否(默认:2) |
spawnPoints |
无队伍玩家的默认出生点 |
✅ 视情况而定 |
teamSpawnPoints |
各队伍的出生点(例如 0: [...], 1: [...]) |
✅ 视情况而定 |
inventory |
游戏开始时的初始物品(例如 ["WOODEN_SHOVEL"]) |
❌ 否 |
allowed_break_blocks |
允许破坏的方块(例如 ["SNOW_BLOCK"]) |
❌ 否 |
allowed_place_blocks |
允许放置的方块(例如 ["OAK_PLANKS"]) |
❌ 否 |
respawnMode |
控制重生行为:"true" 或 "false" |
❌ 否(默认:false) |
respawnDelay |
重生前的延迟秒数(如果启用) |
❌ 否(默认:0) |
doDurability |
控制物品耐久度:true(原版)或 false |
❌ 否(默认:true) |
allowPVP |
允许 PvP:true(原版)或 false |
❌ 否(默认:true) |
blocked_damage_causes |
阻止以下伤害来源发生 |
❌ 否 |
timeLimit |
经过 X 秒后停止游戏 |
❌ 否(默认:600) |
allowFriendlyFire |
允许同一队伍的成员互相攻击 |
❌ 否(默认:false) |
allowCrafting |
允许玩家在游戏中制作物品 |
❌ 否(默认:false) |
silenceDeathMessages |
是否静默死亡消息 |
❌ 否(默认:false) |
hostPerm |
只有拥有此权限的玩家才能主持此游戏 |
❌ 否(默认:mgcore.host) |
joinPerm |
只有拥有此权限的玩家才能加入此游戏 |
❌ 否(默认:mgcore.join) |
doHunger |
玩家的饥饿条是否应消耗 |
❌ 否(默认:false) |
allowOpeningContainers |
允许玩家在游戏开始前打开容器 |
❌ 否(默认:false) |
8 人制 Spleef 游戏的配置示例:
game:
name: Spleef
maxPlayers: 8
teams: 0
spawnPoints:
spawn1:
x: -11
y: 64
z: 0
spawn2:
x: -7
y: 64
z: -7
spawn3:
x: 0
y: 64
z: -11
spawn4:
x: 7
y: 64
z: -7
spawn5:
x: 11
y: 64
z: 0
spawn6:
x: 7
y: 64
z: 7
spawn7:
x: 0
y: 64
z: 11
spawn8:
x: -7
y: 64
z: 7
inventory:
- "iron_shovel"
allowed_break_blocks:
- "snow_block"
respawnMode: false
doDurability: false
allowPVP: false
‼️ API
你可以通过使用 Gradle 导入项目来使用 MiniGameCoreAPI!将以下内容粘贴到你的 build.gradle 文件中:
repositories {
maven { url "https://jitpack.io" }
}
dependencies {
implementation 'com.github.Wueffi:MiniGameCore:master-SNAPSHOT'
}
在你的项目中,使用 import wueffi.MiniGameCore.x 导入类/事件/方法。
可用事件包括:
GameStartEvent,包含 event.getGameName() 和 event.getLobby()
GameOverEvent,包含 event.getLobby()
有用的 MGC 类包括:
Lobby
Team
可用的 API 方法包括:
getLobbyManager() -> 返回 LobbyManager 实例
winPlayer(Lobby lobby, Player player) -> 让单个玩家赢得游戏
winTeam(Lobby lobby, Team team) -> 让一个队伍赢得游戏
playerDeath(UUID playerid) -> 通知 MiniGameCore 某玩家死亡
playerAlive(UUID playerid) -> 通知 MiniGameCore 某玩家重生
getRespawnLocation(UUID playerid) -> 返回玩家的重生位置
MiniGameCore
MiniGameCore is a central plugin for managing minigame lobbies in Minecraft Paper Servers. It handles hosting, joining, starting, and stopping games – with animated scoreboards, statistics, and multiverse support.
🔧 Installation
- Download the latest
.jar from Modrinth or Releases.
- Place the file in the
plugins/ folder of your Minecraft server.
- For permission-management, you can optionally use a plugin like LuckPerms.
- Restart the server once.
📜 Commands & Permissions
Aliases: /p for /party and /tc for /teamchat
| Command |
Description |
Permission |
/mg host <game> |
Creates a new lobby |
mgcore.host |
/mg join <lobby-id> |
Join the lobby |
mgcore.join |
/mg ready |
Set your Status as Ready |
mgcore.ready |
/mg unready |
Set your Status as not Ready |
mgcore.ready |
/mg confirm |
Confirm an action |
mgcore.confirm |
/mg leave |
Leave the lobby or game |
mgcore.leave |
/mg start |
Start the game manually (if allowed) |
mgcore.start |
/mg spectate <lobby-id|player> |
Join a game as a spectator |
mgcore.spectate |
/mg reload |
Reload the plugin |
mgcore.admin |
/mg stop <lobby-id> |
Stop a specific game |
mgcore.admin |
/mg stopall |
Stop all active games |
mgcore.admin |
/mg ban <player> |
Ban the player from using most MiniGameCore commands |
mgcore.admin |
/mg version |
Displays the version of MiniGameCore you are using |
mgcore.use (default) |
/party create <name> |
Creates a new party |
mgcore.party.create |
/party join <player> |
Join the player's Party |
mgcore.party.join |
/party leave |
Leave your party |
mgcore.party.join |
/party invite <player> |
Invite a player to your party |
mgcore.party.invite |
/party deny |
Deny a player's invitation to their party |
mgcore.party.invite |
/party list |
List the Party's Members |
mgcore.party.list |
/teamchat <message> |
Sends the message to your team only |
mgcore.teamchat |
⚙️ Plugin-Configurations
Plugin Configurations are located in the folder: ./plugins/MiniGameCore. The main configuration file is config.yml.
config.yml
Example config:
available-games:
- Game1
- Game2
- Game3
banned-players:
- 2e0749e5-4ec0-4201-b58d-c4277014749c
- 337482fe-8a15-47f6-bea5-a84918a86393
keep-worlds: false
disable-scoreboard: false
keep-inventories-after-games: true
Note: if keep-worlds: true, the plugin is going to move them to ./plugins/MiniGameCore/ArchivedWorlds instead of deleting them.
Loading Game-Worlds & Configuring them
The Folder for Gameworlds and configs is ./MiniGameCore. Every Game World should be named like this: <Game name>_world. If you want multiple maps per game, name the other worlds <Game name>_world<index>. The world configs are named config.yml and should be located in the Game's world folder.
All available options:
| Field |
Description |
Required / Default |
name |
Display name of the game, e.g. in the scoreboard or at /mg host |
✅ Yes |
maxPlayers |
Maximum number of players for this game instance |
✅ Yes |
teams |
Maximum number of teams (0 for no teams, 2-8 teams possible) |
❌ No (default: 0) |
minPlayers |
Minimum number of players for this game |
❌ No (default: 2) |
spawnPoints |
Default spawn points for players without a team |
✅ Depends |
teamSpawnPoints |
Spawn points per team (e.g. 0: [...], 1: [...]) |
✅ Depends |
inventory |
Starting items at game start (e.g. ["WOODEN_SHOVEL"]) |
❌ No |
allowed_break_blocks |
Which blocks can be broken (e.g. ["SNOW_BLOCK"]) |
❌ No |
allowed_place_blocks |
Which blocks can be placed (e.g. ["OAK_PLANKS"]) |
❌ No |
respawnMode |
Control of respawn behavior: "true" or "false" |
❌ No (default: false) |
respawnDelay |
Seconds delay until respawn (if enabled) |
❌ No (default: 0) |
doDurability |
Control ItemDamage: true (vanilla) or false |
❌ No (default: true) |
allowPVP |
Allow PVP: true (vanilla) or false |
❌ No (default: true) |
blocked_damage_causes |
Stop these damage causes from happening |
❌ No |
timeLimit |
Stops a game after X seconds have passed |
❌ No (default: 600) |
allowFriendlyFire |
Allow members of the same team to attack each other |
❌ No (default: false) |
allowCrafting |
Allows Players to craft items during the game |
❌ No (default: false) |
silenceDeathMessages |
Whether or not to silence death messages |
❌ No (default: false) |
hostPerm |
Only players with this permission may host this game |
❌ No (default: mgcore.host) |
joinPerm |
Only players with this permission may join this game |
❌ No (default: mgcore.join) |
doHunger |
Whether players' hunger bars should deplete |
❌ No (default: false) |
allowOpeningContainers |
Allows players to open containers before the game starts |
❌ No (default: false) |
Example config for an 8 player Spleef-Game:
game:
name: Spleef
maxPlayers: 8
teams: 0
spawnPoints:
spawn1:
x: -11
y: 64
z: 0
spawn2:
x: -7
y: 64
z: -7
spawn3:
x: 0
y: 64
z: -11
spawn4:
x: 7
y: 64
z: -7
spawn5:
x: 11
y: 64
z: 0
spawn6:
x: 7
y: 64
z: 7
spawn7:
x: 0
y: 64
z: 11
spawn8:
x: -7
y: 64
z: 7
inventory:
- "iron_shovel"
allowed_break_blocks:
- "snow_block"
respawnMode: false
doDurability: false
allowPVP: false
‼️ API
You can use the MiniGameCoreAPI by importing the Project using Gradle! Paste this in your build.gradle:
repositories {
maven { url "https://jitpack.io" }
}
dependencies {
implementation 'com.github.Wueffi:MiniGameCore:master-SNAPSHOT'
}
In your project, import classes/events/methods using import wueffi.MiniGameCore.x
Available Events are:
GameStartEvent with event.getGameName() and event.getLobby()
GameOverEvent with event.getLobby()
Helpful MGC Classes are:
Lobby
Team
Available API methods are:
getLobbyManager() -> return the LobbyManager instance
winPlayer(Lobby lobby, Player player) -> let a singular Player win a game
winTeam(Lobby lobby, Team team) -> let a Team win a game
playerDeath(UUID playerid) -> notify MiniGameCore of a Players Death
playerAlive(UUID playerid) -> notify MiniGameCore of a Players Respawn
getRespawnLocation(UUID playerid) -> returns the Respawn location of a player
评论 0
登录后参与评分
还没有评论,来抢沙发吧