? FloralSMP 插件
由 Abusefully 开发的一款强大的 Bukkit/Spigot 插件,可将普通的花朵(以及蘑菇!)转化为独特的魔法能力。同时装备最多两朵“花”,即可获取被动增益或释放壮观的主动技能。
? 安装
- 下载 编译好的 JAR 文件,并将其放入服务器的
plugins/ 文件夹中。
- 重启 或 重载 服务器。
- 启动时,插件将自动注册其命令、事件监听器,并开始执行后台任务(动作栏更新器、被动效果应用器、清理例程)。
⚙️ 核心概念
-
花朵类型
在 initializeFlowers() 中定义。每种花朵包含:
- 唯一的 名称 和 图标 (
Material)
- 显示名称 与 描述文本(鼠标悬停时显示)
- 一种 能力类型:
- PASSIVE(被动) → 持续生效(无限持续时间的药水效果或自动增强)
- ACTIVE(主动) → 通过潜行点击触发(
triggerActiveAbility()),拥有独立的冷却时间
- 冷却时间(毫秒)、可选的 药水效果、等级、数值(例如治疗百分比),以及如果是“唯一”花朵,则需解锁对应的 Minecraft 进度
-
玩家数据 (PlayerFlowerData)
跟踪已装备的花朵(flower1, flower2)、各花朵的冷却计时器,以及特殊能力的标志位(例如催眠状态、伪装)。还保存速率限制时间戳及飞行/皮肤的原生状态。
-
所有权
唯一花朵(与成就绑定)只能存在一份。所有权存储在 flowerOwners 中,并在玩家死亡或掉落时释放。
-
清理例程
每 24 小时异步运行,清除离线玩家超过 7 天的数据,并释放孤立唯一花朵的所有权。
✨ 花朵能力
-
风之花 (ACTIVE)
• 将自己向上发射
• 白色螺旋 + 云朵/烟花粒子效果
• 25 秒冷却
• 解锁条件:minecraft:adventure/sleep_in_bed
-
催眠蘑菇 (ACTIVE)
• 使附近手持可写书的玩家“签名”并掉落该物品,同时造成击退效果
• 60 秒冷却
• 解锁条件:minecraft:story/enchant_item
-
暗影之花 (ACTIVE)
• 获得 15 秒隐身 + 飞行效果
• 黑色烟雾/法术粒子效果
• 180 秒冷却
• 解锁条件:minecraft:nether/get_wither_skull
-
传送之花 (ACTIVE)
• 传送到瞄准的方块(射线检测最大距离 100 格)
• 紫色传送门/龙息粒子效果
• 45 秒冷却
• 解锁条件:minecraft:end/enter_end_gateway
-
法师之花 (ACTIVE)
• 在光标处召唤闪电(最大距离 50 格)
• 附魔命中 & 暴击粒子效果
• 20 秒冷却
• 解锁条件:minecraft:adventure/lightning_rod_with_villager_no_fire
-
伪装之花 (ACTIVE)
• 伪装自己(及附近盟友)为“未知”(史蒂夫皮肤),持续 180 秒
• 5 分钟冷却
• 解锁条件:minecraft:nether/find_fortress
-
力量玫瑰 (PASSIVE)
• 力量 I 增益(无限持续时间)
• 解锁条件:无
-
战士之花 (PASSIVE)
• 力量 II 增益(无限持续时间)
• 解锁条件:minecraft:adventure/kill_all_mobs
-
速度之花 (PASSIVE)
• 速度 III 增益(无限持续时间)
• 解锁条件:minecraft:story/deflect_arrow
-
吸血之花 (PASSIVE)
• 恢复近战造成伤害的 30%,伴随爱心/血液粒子效果
• 解锁条件:minecraft:story/enter_the_nether
-
效果之花 (PASSIVE)
• 将所有药水效果的等级翻倍(上限为等级 10),并影响新施加的效果
• 解锁条件:minecraft:nether/all_potions
被动效果会在登录和插件重载时通过计划更新的调度器重新应用。
? 命令与权限
-
/floral help (floral.use)
显示游戏内使用指南。
-
/floral list (floral.use)
列出所有花朵、其解锁条件及当前所有权状态。
-
/floral bypass (floral.bypass)
切换主动能力的冷却绕过功能(仅限自身)。
-
/floral give <player> <flower> (floral.admin)
向玩家授予任意花朵物品(唯一花朵仅在未拥有状态下可授予)。
-
/floral reload (floral.admin)
重载花朵定义并将被动效果重新应用到在线玩家。
-
/unequip <flower_name> (floral.use)
卸下一个花朵槽位,并将物品返回至你的背包。
? 致谢
? FloralSMP Plugin
A powerful Bukkit/Spigot plugin by Abusefully that turns simple flowers (and mushrooms!) into unique magical abilities. Equip up to two “flowers” at a time to gain passive buffs or unleash spectacular active powers.
? Installation
- Download the compiled JAR and place it in your server’s
plugins/ folder.
- Restart or reload the server.
- Upon startup, the plugin will automatically register its commands, event listeners, and begin its background tasks (action-bar updater, passive effect applier, cleanup routine).
⚙️ Core Concepts
-
Flower Types
Defined in initializeFlowers(). Each has:
- A unique name and icon (
Material)
- Display name & lore (shown on hover)
- An ability type:
- PASSIVE → always-on (
INFINITE_DURATION potion effects or automatic enhancements)
- ACTIVE → triggered on sneak‑click (
triggerActiveAbility()), with individual cooldowns
- Cooldown (ms), optional potion effect, amplifier, value (e.g., healing %), and—if “unique”—a required Minecraft advancement
-
Player Data (PlayerFlowerData)
Tracks equipped flowers (flower1, flower2), per-flower cooldown timers, and flags for special abilities (e.g., hypnosis state, masking). Holds rate-limit timestamps and original state for flight/skin.
-
Ownership
Unique flowers (tied to achievements) can only exist once. Ownership is stored in flowerOwners and released on death or drop.
-
Cleanup Routine
Every 24 h asynchronously, purges offline players’ data after 7 days, and frees up orphaned unique‑flower ownerships.
✨ Flower Abilities
-
Wind Flower (ACTIVE)
• Launch yourself upward
• White spiral + cloud/firework particles
• 25 s cooldown
• Unlock: minecraft:adventure/sleep_in_bed
-
Hypnosis Mushroom (ACTIVE)
• Make nearby players holding writable books “sign” & drop them, plus knockback
• 60 s cooldown
• Unlock: minecraft:story/enchant_item
-
Shadow Flower (ACTIVE)
• Invisibility + flight for 15 s
• Dark smoke/spell particles
• 180 s cooldown
• Unlock: minecraft:nether/get_wither_skull
-
Teleport Flower (ACTIVE)
• Teleport to targeted block (raycast up to 100 blocks)
• Purple portal/dragon‑breath effects
• 45 s cooldown
• Unlock: minecraft:end/enter_end_gateway
-
Mage Flower (ACTIVE)
• Summon lightning at cursor (up to 50 blocks)
• Enchanted‑hit & crit effects
• 20 s cooldown
• Unlock: minecraft:adventure/lightning_rod_with_villager_no_fire
-
Masking Flower (ACTIVE)
• Disguise self (and nearby allies) as “Unknown” (Steve skin) for 180 s
• 5 min cooldown
• Unlock: minecraft:nether/find_fortress
-
Rose of Strength (PASSIVE)
• Strength I buff (infinite)
• Unlock: none
-
Warrior Flower (PASSIVE)
• Strength II buff (infinite)
• Unlock: minecraft:adventure/kill_all_mobs
-
Speed Flower (PASSIVE)
• Speed III buff (infinite)
• Unlock: minecraft:story/deflect_arrow
-
Vampiric Flower (PASSIVE)
• Heals 30% of melee damage dealt, with heart/blood particles
• Unlock: minecraft:story/enter_the_nether
-
Effect Flower (PASSIVE)
• Doubles amplifier of all potion effects (capped at amp 10) and newly‑applied effects
• Unlock: minecraft:nether/all_potions
Passive effects are (re)applied on login and plugin reload via scheduled updaters.
? Commands & Permissions
-
/floral help (floral.use)
Show in‑game usage guide.
-
/floral list (floral.use)
List all flowers, their unlocks, and current ownership status.
-
/floral bypass (floral.bypass)
Toggle cooldown bypass for active abilities (self only).
-
/floral give <player> <flower> (floral.admin)
Grant any flower item to a player (unique flowers only if unowned).
-
/floral reload (floral.admin)
Reload flower definitions & reapply passive effects to online players.
-
/unequip <flower_name> (floral.use)
Unequip a flower slot and return the item to your inventory.
? Credits
评论 0
登录后参与评分
还没有评论,来抢沙发吧