Simple Home Gui - 基于槽位的家园系统
Simple Home Gui 是一款现代化的、基于图形用户界面(GUI)的家园系统。它采用可视化的槽位系统(类似于 8 个“存档槽”),为玩家提供了一种直观且对新手友好的方式来管理他们的家园。
该插件从底层开始就针对 Paper 1.20.1 进行了优化,专注于稳定性、性能(通过缓存机制)以及丰富的配置选项。
核心功能
1. 基于槽位的 GUI 菜单
该插件的核心是主菜单,通过 /homes 命令打开。
- 视觉反馈: 玩家可以看到 8 个槽位(由床和染色剂表示),这些槽位可代表三种状态:
- 绿色(已设置): 家园已设置。显示名称和坐标。点击可打开子菜单。
- 灰色(空): 槽位已解锁,但未设置任何家园。点击可将当前所在位置设置为家园。
- 红色(锁定): 玩家没有使用该槽位所需的权限。
- 子菜单: 点击已设置(绿色)的家园会打开一个单独的菜单,玩家可以在其中选择:
- 完全可自定义: GUI 的布局、物品(床、染色剂、末影珍珠等)以及所有文本都可以在
config.yml 和语言文件中自由配置。
2. 全面的命令系统
对于偏好使用命令的玩家,Simple Home Gui 提供了通过聊天窗口实现的全部功能。
/homes:打开 GUI。
/homes set <slot> [name]:在指定槽位设置家园(例如 /homes set 1 Base)。
/homes tp <slot_or_name>:传送到某个家园。支持槽位编号(例如 /homes tp 1)和名称(例如 /homes tp Base)。
/homes delete <slot>:删除指定槽位中的家园。
/homes rename <slot> <new_name>:重命名家园(例如 /homes rename 1 Farm)。
- 自动补全: 所有命令及其参数(包括槽位编号和家园名称)均支持 Tab 键自动补全。
3. 安全传送计时器
为了防止滥用(例如在战斗期间),每次传送都包含一个计时器。
- 3秒延迟: 传送仅在等待 3 秒后执行。
- 移动取消: 如果在倒计时期间玩家离开了所在方块,传送将自动取消。
配置与自定义
该插件旨在完美集成到您的服务器中。所有内容均可配置。
config.yml:
- 聊天前缀: 更改插件名称在聊天中的显示外观。
- 语言: 设置默认语言(例如
en 或 de)。
- GUI 布局: 更改 GUI 中每个槽位(1-8)的确切位置。
- GUI 物品: 为每种状态(已锁定、空、已设置)和每个菜单(主菜单和子菜单)定义所有物品(材质、名称、描述)。
messages_xx.yml:
- 翻译插件发送给玩家的所有消息——从错误消息到 GUI 描述。
权限系统
Simple Home Gui 设计用于配合 LuckPerms(或其他任何权限插件)使用。它不检查组别,而是基于灵活的权限节点进行判断。(忽略原系统名称 Valoria)
- 家园数量限制: 可用槽位的数量通过权限控制。
valoria.homes.limit.1 (所有玩家的默认值)
valoria.homes.limit.2
- ...
valoria.homes.limit.8
- (如果玩家拥有
valoria.homes.limit.5,则槽位 1-5 将解锁(灰色/绿色),而 6-8 将被锁定(红色)。)
- 命令权限:
valoria.homes.command.gui (用于 /homes)
valoria.homes.command.set
valoria.homes.command.tp
valoria.homes.command.delete
valoria.homes.command.rename
- 通配符:
valoria.homes.* (授予所有权限,包括全部 8 个槽位)
技术细节
- 服务器: Paper(或兼容分支,如 Purpur)
- 版本: Minecraft 1.20.1
- 存储: 家园数据由高性能玩家缓存(RAM)管理,并在玩家退出或服务器停止时安全保存至各个
playerdata/<uuid>.yml 文件中。
Simple Home Gui - Slot-Based Home System
Simple Home Gui is a modern, GUI-based home system. It uses a visual slot system (akin to 8 "save slots") that provides players an intuitive and beginner-friendly way to manage their homes.
The plugin is optimized from the ground up for Paper 1.20.1, focusing on stability, performance (via caching), and extensive configuration.
Core Features
1. Slot-Based GUI Menu
The heart of the plugin is the main menu, opened with /homes.
- Visual Feedback: Players see 8 slots (beds and dyes) that can represent 3 states:
- Green (Set): The home is set. Displays the name and coordinates. Clicking opens the submenu.
- Gray (Empty): The slot is unlocked, but no home has been set. Clicking sets the home at the player's current location.
- Red (Locked): The player does not have the necessary permissions for this slot.
- Submenu: Clicking a set (green) home opens a separate menu where the player can choose to:
- Teleport
- Delete Home
- Go back to the overview
- Fully Customizable: The layout, items (beds, dyes, ender pearls, etc.), and all text in the GUI can be freely configured in the
config.yml and language files.
2. Comprehensive Command System
For players who prefer commands, Simple Home Gui offers full functionality via the chat.
/homes: Opens the GUI.
/homes set <slot> [name]: Sets a home in a specific slot (e.g., /homes set 1 Base).
/homes tp <slot_or_name>: Teleports to a home. Accepts both the slot number (e.g., /homes tp 1) and the name (e.g., /homes tp Base).
/homes delete <slot>: Deletes the home in the specified slot.
/homes rename <slot> <new_name>: Renames a home (e.g., /homes rename 1 Farm).
- Tab Completion: All commands and arguments (including slot numbers and home names) are fully tab-completable.
3. Safe Teleport Timer
To prevent abuse (e.g., in combat), every teleport includes a timer.
- 3-Second Delay: The teleport only executes after 3 seconds.
- Movement Cancellation: If the player moves from their block during the countdown, the teleport is automatically cancelled.
Configuration & Customization
The plugin was designed to be perfectly integrated into your server. Everything is configurable.
config.yml:
- Chat Prefix: Change the appearance of the plugin's name in chat.
- Language: Set the default language (e.g.,
en or de).
- GUI Layout: Change the exact position of every single slot (1-8) in the GUI.
- GUI Items: Define every item (material, name, lore) for every state (Locked, Empty, Set) and every menu (Main and Submenu).
messages_xx.yml:
- Translate every single message the plugin sends to players—from error messages to GUI descriptions.
Permission System
Simple Home Gui is designed for use with LuckPerms (or any other permissions plugin). It does not check for groups, but for flexible permission nodes.(ignores the name Valoria that was the original name of the system)
- Home Limits: The number of available slots is controlled via permissions.
valoria.homes.limit.1 (Default for every player)
valoria.homes.limit.2
- ...
valoria.homes.limit.8
- (If a player has
valoria.homes.limit.5, slots 1-5 will be unlocked (gray/green) and 6-8 will be locked (red).)
- Command Permissions:
valoria.homes.command.gui (For /homes)
valoria.homes.command.set
valoria.homes.command.tp
valoria.homes.command.delete
valoria.homes.command.rename
- Wildcard:
valoria.homes.* (Grants all permissions, including all 8 slots)
Technical Details
- Server: Paper (or compatible forks like Purpur)
- Version: Minecraft 1.20.1
- Storage: Homes are managed in a high-performance player cache (RAM) and are saved securely to individual
playerdata/<uuid>.yml files on logout or server stop.
评论 0
登录后参与评分
还没有评论,来抢沙发吧