Amnesia
Amnesia 是一款高度可配置的 Minecraft 插件,适用于 PaperMC 和 Folia 服务器,用于打乱合成配方。它提供两种不同的打乱模式:随机物品替换和配方结果交换。
功能特性
- 配方打乱: 两种配方操作模式:
- 随机物品模式: 将配方的输出替换为来自 Minecraft 物品注册表的随机物品。
- 配方结果打乱模式: 在现有配方之间交换配方的输出。
- 基于计时器的重新打乱: 按照可配置的时间间隔自动重新打乱配方,并附带倒计时通知。
- 基于种子的轮换: 支持使用种子来生成和回忆特定的配方打乱状态。
- 跨重启同步: 配方打乱状态和计时器设置会在服务器重启后持久保存。
- 客户端配方同步: 通过三种不同模式控制客户端如何处理配方更改。
- 命令行界面: 提供全面的命令来管理打乱、计时器、种子和配置。
- 配置文件: 基于 YAML 的配置文件,用于持久化设置和自定义。
- 性能优先: 专为最小化服务器影响而设计,特别是在 Folia 服务器上。
- 用户通知: 向玩家发送清晰且信息丰富的消息,告知即将执行和已执行的配方打乱。
命令
/amnesia shuffle [mode] [seed <value>|random] - 使用指定模式打乱配方,并可可选地指定种子。
/amnesia timer [enable|disable|interval <seconds>] - 管理基于计时器的重新打乱。
/amnesia seed [view|set <seed>|random] - 管理打乱种子。
/amnesia reload - 重新加载插件配置。
权限
amnesia.command.shuffle - 允许使用 /amnesia shuffle 命令。
amnesia.command.timer - 允许使用 /amnesia timer 命令。
amnesia.command.seed - 允许使用 /amnesia seed 命令。
amnesia.command.reload - 允许使用 /amnesia reload 命令。
配置
该插件使用 config.yml 文件进行配置设置,并使用 data.yml 文件存储持久化数据。以下是一个示例配置:
# 打乱模式:"random_item" 或 "recipe_result"
shuffle-mode: "random_item"
# 计时器间隔(秒)(默认值:3600 - 1小时)
timer-interval: 3600
# 是否默认启用基于计时器的重新打乱
timer-enabled: false
# 客户端配方同步模式:
# "resync" - 客户端将与新配方重新同步(默认)
# "clear" - 客户端不会获得任何配方
# "vanilla" - 不触碰客户端配方,让 Minecraft 自行处理
client-sync-mode: "vanilla"
# 排除在打乱之外的配方键列表
excluded-recipes:
# - "minecraft:stick"
# 在 random_item 打乱模式中排除被选中的物品键列表
excluded-random-items:
- "minecraft:air"
- "minecraft:barrier"
# ... 更多物品
# 计时器通知的倒计时间隔(秒)
notification-intervals:
- 300 # 5分钟
- 60 # 1分钟
- 30 # 30秒
# ... 更多间隔
# 可自定义的通知消息
notification-messages:
countdown-5-minutes: "<gold>距离配方打乱还有5分钟!</gold>"
# ... 更多消息
data.yml 文件存储持久化数据,例如:
# 用于配方打乱的种子
seed: 123456789
# 种子是否由用户设置(true)还是随机生成(false)
user-set-seed: false
# 配方当前是否已打乱
is-shuffled: false
# 上次打乱配方的时间(自纪元以来的毫秒数)
last-shuffle-time: 0
安装
- 从发布页面下载最新版本。
- 将 JAR 文件放入服务器的
plugins 文件夹中。
- 启动或重启服务器。
- 通过编辑
plugins/Amnesia 文件夹中的 config.yml 文件来配置插件。
支持
如果遇到任何问题或有建议,请在 GitHub 仓库上提交 Issue。
Amnesia
Amnesia is a highly configurable Minecraft plugin for PaperMC and Folia servers that shuffles crafting recipes. It offers two distinct shuffling modes: random item replacement and recipe result swapping.
Features
- Recipe Shuffling: Two modes of recipe manipulation:
- Random Item Mode: Recipe outputs are replaced with random items from the Minecraft item registry.
- Recipe Result Shuffle Mode: Recipe outputs are shuffled amongst existing recipes.
- Timer-Based Reshuffling: Automatic reshuffling of recipes at configurable intervals with countdown notifications.
- Seed-Based Rotations: Ability to use seeds to generate and recall specific recipe shuffles.
- Cross-Restart Synchronization: Recipe shuffle state and timer settings persist across server restarts.
- Client Recipe Synchronization: Control how clients handle recipe changes with three different modes.
- Command-Line Interface: Comprehensive commands for managing shuffling, timer, seed, and configuration.
- Configuration File: YAML based configuration for persistent settings and customization.
- Performance Focused: Designed for minimal server impact, especially on Folia servers.
- User Notifications: Clear and informative messages to players about upcoming and executed recipe shuffles.
Commands
/amnesia shuffle [mode] [seed <value>|random] - Shuffles recipes using the specified mode and optionally a seed.
/amnesia timer [enable|disable|interval <seconds>] - Manages the timer-based reshuffling.
/amnesia seed [view|set <seed>|random] - Manages the shuffle seed.
/amnesia reload - Reloads the plugin configuration.
Permissions
amnesia.command.shuffle - Allows use of /amnesia shuffle command.
amnesia.command.timer - Allows use of /amnesia timer command.
amnesia.command.seed - Allows use of /amnesia seed command.
amnesia.command.reload - Allows use of /amnesia reload command.
Configuration
The plugin uses a config.yml file for configuration settings and a data.yml file for persistent data. Here's an example configuration:
# Shuffle mode: "random_item" or "recipe_result"
shuffle-mode: "random_item"
# Timer interval in seconds (default: 3600 - 1 hour)
timer-interval: 3600
# Whether the timer-based reshuffling is enabled by default
timer-enabled: false
# Client recipe synchronization mode:
# "resync" - Clients will be resynced with the new recipes (default)
# "clear" - Clients won't get any recipes
# "vanilla" - Don't touch client recipes and let Minecraft handle it
client-sync-mode: "vanilla"
# List of recipe keys to exclude from shuffling
excluded-recipes:
# - "minecraft:stick"
# List of item keys to exclude from being selected in random_item shuffle mode
excluded-random-items:
- "minecraft:air"
- "minecraft:barrier"
# ... more items
# Countdown intervals (in seconds) for timer notifications
notification-intervals:
- 300 # 5 minutes
- 60 # 1 minute
- 30 # 30 seconds
# ... more intervals
# Customizable notification messages
notification-messages:
countdown-5-minutes: "<gold>5 minutes until recipes are shuffled!</gold>"
# ... more messages
The data.yml file stores persistent data such as:
# The seed used for recipe shuffling
seed: 123456789
# Whether the seed was set by the user (true) or generated randomly (false)
user-set-seed: false
# Whether recipes are currently shuffled
is-shuffled: false
# When recipes were last shuffled (milliseconds since epoch)
last-shuffle-time: 0
Installation
- Download the latest release from the releases page.
- Place the JAR file in your server's
plugins folder.
- Start or restart your server.
- Configure the plugin by editing the
config.yml file in the plugins/Amnesia folder.
Support
If you encounter any issues or have suggestions, please open an issue on the GitHub repository.
评论 0
登录后参与评分
还没有评论,来抢沙发吧