FlatScript 是一款轻量级、无需缩进的 Minecraft 服务器脚本语言,适用于运行 Paper 1.20.1 – 1.21.4 的服务器。它允许服务器管理员在不编写任何 Java 代码的情况下创建自定义功能。
特性包括:无需缩进、括号或分号的简洁语法。你可以创建自定义命令,如 /kit、/heal 或 /fly。事件系统可在玩家加入、退出、死亡、聊天、移动、受到伤害等时机触发脚本。GUI 菜单允许你创建带有可点击按钮的交互式商店。NBT 系统用于在玩家、物品和实体上存储持久数据。随机系统可生成随机数、从列表中随机选取物品以及检查概率。MiniMessage 和 RGB 支持提供渐变文本和十六进制颜色。可点击链接可在玩家的浏览器中打开 URL。冷却系统限制玩家使用命令的频率。粒子与音效效果可以在任意位置生成。标题栏和操作栏消息完全受支持。支持传送到特定坐标或出生点。游戏模式切换易于实现。PlaceholderAPI 支持允许使用任意占位符。Vault 支持 enabling 检查余额、给予金钱和扣除金钱。插件系统允许开发者通过自定义函数、条件和效果来扩展 FlatScript。
示例命令脚本:
command /kit:
cooldown check kit 60 &cWait {time} seconds!
give player 1 diamond_sword
give player 16 steak
send player &aKit received!
effect player speed 30
play_sound player ENTITY_PLAYER_LEVELUP 1 1
示例事件脚本:
on player join:
send player &6Welcome %player%!
give player 1 cookie
broadcast server: &e%player% joined the game!
示例 GUI 脚本:
gui shop:
title &6&lITEM SHOP
rows 3
button 11 &aDiamond Sword "give player 1 diamond_sword"
button 13 &bGolden Apple "give player 1 golden_apple"
button 22 &cClose "gui close"
command /shop:
gui open shop
命令:
/fs reload - 重载所有脚本
/fs help - 显示帮助菜单
安装:
- 下载 FlatScript.jar
- 将其放入服务器的 plugins 文件夹
- 重启服务器
- 在 plugins/FlatScript/scripts/ 中创建 .fs 文件
- 运行 /fs reload 以加载你的脚本
要求:
- Paper 1.20.1 – 1.21.4(也兼容 Purpur、Pufferfish 及其他 Paper 分支)
- Java 17 或更高版本
- 无需依赖项(PlaceholderAPI 和 Vault 为可选)
许可证:
本软件按“原样”提供,不提供任何明示或暗示的担保。在任何情况下,作者均不对因使用本软件而产生的任何损害承担责任。
任何人皆可出于任何目的(包括商业应用)使用本软件,并自由修改和重新分发,但须遵守以下限制:
- 不得歪曲本软件的来源;不得声称你编写了原始软件。如果在产品中使用了本软件,在产品文档中加入致谢将受到欢迎,但并非必需。
- 修改后的源代码版本必须明确标明,且不得被歪曲为原始软件。
- 此通知不得从任何源代码分发中移除或更改。
版权所有 © 2026 VoidOaz (FlatScript Team)。
FlatScript is a lightweight, no-indent scripting language for Minecraft servers running Paper 1.20.1 – 1.21.4. It allows server owners to create custom features without writing a single line of Java.
Features include simple syntax with no indentation, brackets, or semicolons. You can create custom commands like /kit, /heal, or /fly. The event system triggers scripts on player join, quit, death, chat, move, damage, and more. GUI menus allow you to create interactive shops with clickable buttons. The NBT system stores persistent data on players, items, and entities. The random system generates random numbers, picks random items from lists, and checks chances. MiniMessage and RGB support provides gradient text and hex colors. Clickable links open URLs in the player's browser. The cooldown system limits how often players can use commands. Particle and sound effects can be spawned anywhere. Title and action bar messages are fully supported. Teleportation to specific coordinates or spawn is available. Gamemode changes are simple to implement. PlaceholderAPI support allows any placeholder to be used. Vault support enables checking balances, giving money, and taking money. The addon system allows developers to extend FlatScript with custom functions, conditions, and effects.
Example command script:
command /kit:
cooldown check kit 60 &cWait {time} seconds!
give player 1 diamond_sword
give player 16 steak
send player &aKit received!
effect player speed 30
play_sound player ENTITY_PLAYER_LEVELUP 1 1
Example event script:
on player join:
send player &6Welcome %player%!
give player 1 cookie
broadcast server: &e%player% joined the game!
Example GUI script:
gui shop:
title &6&lITEM SHOP
rows 3
button 11 &aDiamond Sword "give player 1 diamond_sword"
button 13 &bGolden Apple "give player 1 golden_apple"
button 22 &cClose "gui close"
command /shop:
gui open shop
Commands:
/fs reload - Reload all scripts
/fs help - Show help menu
Installation:
- Download FlatScript.jar
- Place it in your server's plugins folder
- Restart your server
- Create .fs files in plugins/FlatScript/scripts/
- Run /fs reload to load your scripts
Requirements:
- Paper 1.20.1 – 1.21.4 (also works on Purpur, Pufferfish, and other Paper forks)
- Java 17 or higher
- No dependencies required (PlaceholderAPI and Vault are optional)
License:
This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
- The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
- Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
- This notice may not be removed or altered from any source distribution.
Copyright © 2026 VoidOaz (FlatScript Team).
评论 0
登录后参与评分
还没有评论,来抢沙发吧