?️ CustomGenerator
一款功能齐全、兼容 BentoBox 的生成器插件,旨在为岛屿所有者提供购买、管理和激活自定义圆石、石头、玄武岩或深板岩生成器的能力。所有配置均通过易于编辑的 YAML 文件处理,使服务器管理员能够轻松灵活地进行自定义。
✨ 功能特性
- 基于岛屿的购买与激活流程,内置经济系统与岛屿等级验证
- 直观的GUI 菜单,用于浏览分类及单个生成器类型
- 由
custom-generator-categories.yml 驱动的自定义生成器逻辑
- 通过 YAML 文件完全自定义消息、GUI 布局及生成器设置
- 高效的缓存优先设计,实现快速响应并最小化服务器负载
- 便捷的 reload 命令,无需重启服务器即可即时应用配置更改
- 支持多种生成器类别,包括经典的圆石以及高级的玄武岩和深板岩类型
- 模块化代码架构,职责分离清晰,便于未来扩展
- 通过 Vault 集成经济系统,实现无缝的交易管理
- 集成 BentoBox 岛屿等级检查,以维持平衡的游戏进度
? v1.1.0 更新内容
? 新功能
-
自定义生成器类别(通过 custom-generator-categories.yml):
使用流体流动条件、周围方块、生物群系、Y 轴高度限制等定义您自己的生成器逻辑。
-
改进的生成器菜单 UI:
视觉增强、更优的布局以及更直观的分类按钮。
-
GUI 分页支持:
菜单现在支持无限数量的生成器类型,可通过下一页 / 上一页按钮进行导航。
? 硬依赖
| 插件 |
测试版本 |
用途 |
| BentoBox |
3.0.0+ |
管理岛屿数据与世界隔离 |
| Vault |
1.7+ |
提供用于交易的经济 API |
本插件需要同时安装并启用上述两个依赖项;否则将无法加载。
? 快速入门
- 下载
CustomGenerator.jar 文件并将其放入服务器的 plugins/ 目录中。
- 启动服务器一次以生成默认配置文件:
messages.yml — 可自定义的消息字符串
generator-types.yml — 所有生成器类型的定义
custom-generator-categories.yml — 定义生成器行为
- 根据您的服务器需求和偏好修改 YAML 文件。
- 使用命令
/generator reload 或重启服务器以加载您的自定义设置。
- 鼓励玩家使用
/generator help 查看可用命令及用法。
命令
| 命令 |
描述 |
/generator |
打开主菜单并向玩家显示可用的生成器。 |
/generator buy <generator> |
购买指定的生成器。玩家需拥有足够的资金。 |
/generator activate <generator> |
激活之前购买的生成器。 |
/generator list |
列出服务器上定义的所有生成器。 |
/generator reload |
重新加载所有配置文件。需要管理员权限。 |
⚙️ 配置基础
定义生成器类型
生成器类型在 generator-types.yml 文件中定义。您可以添加新类型或修改现有类型。每个条目指定了生成器的行为及其在 GUI 中的外观。以下是一个示例:
generator-types:
diamond:
display-name: "&bDiamond Generator"
material: DIAMOND_ORE
lore:
- "&bContains rare and valuable resources."
- "&7Produces 30% diamond and 70% stone blocks."
generator-type: COBBLESTONE
price: 5000
required-island-level: 30
blocks:
STONE: 70
DIAMOND_ORE: 30
重要说明:
-
generator-type 必须是内置类别之一(COBBLESTONE、STONE、BASALT、DEEPSLATE),或者是 custom-generator-categories.yml 中定义的自定义类别。
-
blocks 下的值作为相对权重。插件会在内部对这些值进行标准化,因此无论您使用 70/30、0.7/0.3 还是 7/3,其行为都是一致的。
-
如果您的经济插件允许,价格支持小数。
-
material 必须是有效的 Bukkit Material 以用作 GUI 图标。
-
lore 支持多行及颜色代码,用于描述生成器。
创建自定义生成器
自定义生成器在 custom-generator-categories.yml 中定义。示例如下:
dirt_generator:
category: DIRTGEN
display-name: "&2Dirt"
fluid: LAVA
to: AIR
conditions:
sides: [ DIRT ]
up: [ STONE ]
down: [ COARSE_DIRT ]
y-level:
min: 10
max: 64
biomes:
- minecraft:plains
- minecraft:the_void
解释:
-
category: 唯一的类别 ID。必须与 generator-types.yml 中的 generator-type 条目匹配。
-
fluid: 触发的流体方块(例如 LAVA、WATER)。
-
to: 流体流入的方块(AIR、WATER、POWDER_SNOW 等)。
-
conditions: 可选的方块要求(侧面、上方、下方)。
-
y-level: 可选的 Y 轴范围,限定生成器生效的高度区间。
-
biomes: 可选的生物群系白名单,限定生成器生效的区域。
利用此系统,您可以实现:
-
仅限下界使用的玄武岩生成器。
-
Y=100 以上区域使用的金矿石生成器。
-
具有特定周围方块的泥土生成器。
-
仅限特定生物群系的生成器(例如仅蘑菇岛)。
?️ CustomGenerator
A fully‑featured, BentoBox‑compatible generator plugin designed to provide island owners with the ability to buy, manage, and activate custom cobblestone, stone, basalt, or deepslate generators. All configurations are handled via easy-to-edit YAML files, making customization straightforward and flexible for server administrators.
✨ Features
- Per‑island buy & activate workflow with built-in economy and island-level validations
- Intuitive GUI menus for browsing categories & individual generator types
- Custom Generator Logic powered by
custom-generator-categories.yml
- Fully customizable messages, GUI layouts, and generator settings via YAML files
- Efficient cache-first design for fast response times and minimal server load
- Convenient reload command to apply configuration changes instantly without server restarts
- Supports multiple generator categories, including classic cobblestone and advanced basalt and deepslate types
- Clear separation of concerns with modular code architecture for easier future expansions
- Economy integration through Vault for seamless transaction management
- BentoBox island level checks to maintain balanced gameplay progression
? What’s New in v1.1.0
? New Features
-
Custom Generator Categories via custom-generator-categories.yml:
Define your own generator logic using fluid-flow conditions, surrounding blocks, biomes, Y-level limits, and more.
-
Improved Generator Menu UI:
Visual enhancements, better layout, and more intuitive category buttons.
-
Pagination Support in GUI:
The menu now supports unlimited generator types, navigable through Next / Previous page buttons.
? Hard Dependencies
| Plugin |
Tested Version |
Purpose |
| BentoBox |
3.0.0+ |
Manages island data and world separation |
| Vault |
1.7+ |
Provides economy API for transactions |
The plugin requires both dependencies to be installed and enabled; it will not load otherwise.
? Quick Start
- Download the
CustomGenerator.jar file and place it inside your server’s plugins/ directory.
- Start the server once to generate default configuration files:
messages.yml — customizable message strings
generator-types.yml — definitions for all generator types
custom-generator-categories.yml — defines generator behavior
- Modify the YAML files according to your server’s needs and preferences.
- Use the command
/generator reload or restart the server to load your custom settings.
- Encourage players to use
/generator help to see available commands and usage.
Commands
| Command |
Description |
/generator |
Opens the main menu and displays available generators to the player. |
/generator buy <generator> |
Purchases the specified generator. The player must have enough money. |
/generator activate <generator> |
Activates a previously purchased generator. |
/generator list |
Lists all generators defined on the server. |
/generator reload |
Reloads all configuration files. Admin permission required. |
⚙️ Configuration Basics
Defining Generator Types
Generator types are defined inside the generator-types.yml file. You can add new types or modify existing ones. Each entry specifies how the generator behaves and appears in the GUI. Here is an example:
generator-types:
diamond:
display-name: "&bDiamond Generator"
material: DIAMOND_ORE
lore:
- "&bContains rare and valuable resources."
- "&7Produces 30% diamond and 70% stone blocks."
generator-type: COBBLESTONE
price: 5000
required-island-level: 30
blocks:
STONE: 70
DIAMOND_ORE: 30
Important notes:
-
generator-type must either be one of the built-in categories (COBBLESTONE, STONE, BASALT, DEEPSLATE) or a custom category defined in custom-generator-categories.yml.
-
Values under blocks: act as relative weights. The plugin normalizes these internally, so whether you use 70/30, 0.7/0.3, or 7/3, the behavior is consistent.
-
The price supports decimal values if your economy plugin allows it.
-
material must be a valid Bukkit Material for GUI icons.
-
lore supports multiple lines and color codes to describe the generator.
Creating Custom Generator
Custom generators are defined in custom-generator-categories.yml. Example:
dirt_generator:
category: DIRTGEN
display-name: "&2Dirt"
fluid: LAVA
to: AIR
conditions:
sides: [ DIRT ]
up: [ STONE ]
down: [ COARSE_DIRT ]
y-level:
min: 10
max: 64
biomes:
- minecraft:plains
- minecraft:the_void
Explanation:
-
category: Unique category ID. Must match a generator-type entry in generator-types.yml.
-
fluid: Triggering fluid block (e.g., LAVA, WATER).
-
to: Block the fluid flows into (AIR, WATER, POWDER_SNOW etc.).
-
conditions: Optional block requirements (sides, up, down).
-
y-level: Optional Y-axis range for the generator to be active.
-
biomes: Optional biome whitelist for where the generator works.
With this system, you can implement:
-
Basalt generators restricted to the Nether.
-
Gold generators above Y=100.
-
Dirt generators with specific surrounding blocks.
-
Biome-exclusive generators (like Mushroom Islands only).
评论 0
登录后参与评分
还没有评论,来抢沙发吧