Soccer
这是原始 PhysicalBall 插件的一个分支,经过重构后成为一个专注于足球小游戏(minigame)的插件。该分支继续开发工作,增加了游戏功能和生活质量改进,并适配了现代 Paper 服务器。
重要提示:本插件基于 Paper API 进行开发和测试。它不太可能在仅支持旧版 Spigot/Bukkit 的服务器上正常运行,因此建议使用 Paper 以获得最佳兼容性。
概览
Soccer 将交互式“物理球”概念转化为 Minecraft 服务器中可玩的足球(soccer)小游戏。该插件提供了世界内的球体物理效果以及完整的游戏机制:球门、队伍、得分、视觉和音效、皮肤,以及用于创建和管理比赛的管理员工具。
此分支新增和改进的功能
- 比赛管理:创建、列出、加入和离开比赛;将玩家分配至 Team 1 或 Team 2。
- 球门机制:创建持久化的球门(使用提供的工具进行选择),检测球是否进入球门并计分。
- 队伍与队帽:玩家可以加入队伍,并在比赛中获得队帽(装饰性头颅);队帽受到保护,并在离开/重生时恢复。
- 球的激活:将特定的球(物品)绑定到某场比赛,使其在该场比赛中有效。
- 视觉效果:可配置的进球粒子效果、场地标记和球交互特效;屏幕上会显示球门位置标记。
- 音频效果:可配置的进球事件音效以及进球广播音效。
- 皮肤:新的基于头颅/头部的皮肤。
- 统计与管理工具:实时比赛统计数据命令、每场比赛的积分追踪、创建/移除球门和激活球的命令。
- 更简洁的命令和消息:改进了游戏内消息和基于配置文件的本地化文本。
常用命令(精选)
/soccer game join <game> <1|2> - 加入比赛并选择队伍
/soccer game leave - 离开当前比赛
/soccer stats <game> - 显示比赛的实时统计数据
/soccer activate <game> - 激活你手中持有的球以用于某场比赛(必须存在两个球门)
/soccer goal create <1|2> <game> - 开始选择球门位置(提供选择工具)
/soccer goal remove <1|2> <game> - 移除已保存的球门
/soccer games - 列出配置好的比赛
/soccer skin menu - 打开皮肤选择菜单
权限
该插件使用一个主要权限:
soccer.use
没有此权限的玩家无法使用该插件的命令。服务器操作员默认保留访问权限。
配置文件
config.yml - 物理参数、投掷力度、弹跳强度,以及特效/声音的键值和颜色。
messages.yml - 所有面向玩家的文本和操作栏文字。
skins.yml - 配置的头颅皮肤、菜单布局和权限设置。
技术说明
- 专为 Paper 构建:该插件使用了 Paper API 特性以及每个刻(tick)运行的计时器循环,用于更新球实体并渲染标记。在纯 Spigot/Bukkit 上运行可能会导致失败或行为不可预测。
- 数据存储:比赛和球门数据持久化保存在插件文件夹中的
games.yml 文件里。
代码结构速查(快速指引)
- 游戏生命周期、球门和计分逻辑:
game.de.liebki.soccer.GameManager
- 每场比赛的状态和队伍管理:
game.de.liebki.soccer.GameSession
- 球的物理效果和事件处理:
ball.de.liebki.soccer.Ball 和 BallsContainer
- 皮肤和菜单系统:
skin.de.liebki.soccer.SkinChanger, SkullSkin, SkullsContainer
- 粒子/声音辅助工具:
tools.de.liebki.soccer.EffectUtils
- 命令行接口、命令和标签补全:
de.liebki.soccer.CommandListener
许可证及原作者致谢
本仓库包含基于原始 PhysicalBall 项目的工作,并继续使用 MIT 许可证。分发时请保留原始版权声明和许可证通知。
原始项目页面(仅供参考):
致谢
感谢原始 PhysicalBall 插件的作者,以及最初发起该项目的作者们!
Soccer
This is a fork of the original PhysicalBall plugin, reworked into a focused Soccer minigame plugin. The fork continues development, adds gameplay features and quality-of-life improvements, and adapts the plugin for modern Paper servers.
Important: this plugin is developed and tested against the Paper API. It is unlikely to run correctly on older Spigot/Bukkit-only servers, so use Paper for best compatibility.
Overview
Soccer turns the interactive "physical ball" concept into a playable football (soccer) minigame for Minecraft servers. The plugin provides in-world ball physics plus full game mechanics: goals, teams, scoring, visual and sound effects, skins, and admin tools to create and manage matches.
What this fork adds and improves
- Game management: create, list, join and leave matches; assign players to Team 1 or Team 2.
- Goal mechanics: create persistent goals (select with the provided tool), detect when a ball enters a goal and award points.
- Teams & team hats: players can join teams and are given team hats (decorative heads) while in a match; hats are protected and restored on leave/respawn.
- Ball activation: tie a specific ball (item) to a game so it counts for that match.
- Visuals: configurable particle effects for goals, field markers and ball interactions; on-screen markers show goal locations.
- Audio: configurable sound for goal events and broadcast sounds on goals.
- Skins: new skull/head-based skins.
- Stats & admin tools: live game stats command, per-game point tracking, commands to create/remove goals and activate balls.
- Cleaner commands and messages: improved in-game messages and config-driven localization.
Commands (selected)
/soccer game join <game> <1|2> - join a game and select a team
/soccer game leave - leave your current game
/soccer stats <game> - show live stats for a game
/soccer activate <game> - activate the ball you hold for a game (both goals must exist)
/soccer goal create <1|2> <game> - start goal selection (gives selection tool)
/soccer goal remove <1|2> <game> - remove a saved goal
/soccer games - list configured games
/soccer skin menu - open the skin selection menu
Permissions
The plugin uses a single main permission:
soccer.use
Players without this permission cannot use the plugin commands. Server operators retain access by default.
Configuration files
config.yml - physics, throw power, bounce strength, and effect/sound keys and colours.
messages.yml - all player-facing messages and action-bar text.
skins.yml - configured skull skins, menu layout and permissions.
Technical notes
- Built for Paper: The plugin uses Paper API features and a per-tick ticker loop that updates ball entities and renders markers. Running on pure Spigot/Bukkit may fail or behave unpredictably.
- Storage: games and goals are persisted in
games.yml in the plugin folder.
Where to look in the code (quick pointers)
- Game lifecycle, goals, and scoring:
game.de.liebki.soccer.GameManager
- Per-game state and teams:
game.de.liebki.soccer.GameSession
- Ball physics and events:
ball.de.liebki.soccer.Ball and BallsContainer
- Skins and menu:
skin.de.liebki.soccer.SkinChanger, SkullSkin, SkullsContainer
- Particles/sounds helpers:
tools.de.liebki.soccer.EffectUtils
- CLI, commands and tab completion:
de.liebki.soccer.CommandListener
License & original credits
This repository contains work based on the original PhysicalBall project and remains under the MIT License. Please keep the original copyright and license notices when distributing.
Original project page (for reference):
Acknowledgements
Thanks to the authors of the original PhysicalBall plugin and the original-original authors for starting this!
评论 0
登录后参与评分
还没有评论,来抢沙发吧