Class PoliticalSystemManager
java.lang.Object
net.chen.legacyLand.nation.politics.PoliticalSystemManager
政治体制管理器 - 从 politics.yml 加载政体定义,管理效果生命周期
-
Method Summary
Modifier and TypeMethodDescriptionvoidapplySystemChange(com.palmergames.bukkit.towny.object.Nation nation, String oldSystemId, String newSystemId) 当国家切换政体时,触发效果变更获取默认政体(配置中的第一个)static PoliticalSystemManagerlonggetRemainingCooldown(String nationName) 获取剩余冷却时间(秒)获取指定政体获取所有政体IDbooleanisOnCooldown(String nationName) 检查国家是否在切换冷却中booleanisValidSystem(String id) 检查政体ID是否有效voidload(LegacyLand plugin) 从 politics.yml 加载所有政体定义voidregisterEffect(String systemId, PoliticalEffect effect) 为指定政体注册自定义效果voidregisterEffectFactory(String effectName, PoliticalEffectFactory factory) 注册效果工厂(用于从配置创建效果)
-
Method Details
-
getInstance
-
load
从 politics.yml 加载所有政体定义 -
getSystem
获取指定政体 -
getDefaultSystem
获取默认政体(配置中的第一个) -
isValidSystem
检查政体ID是否有效 -
getSystemIds
-
registerEffect
为指定政体注册自定义效果- Parameters:
systemId- 政体IDeffect- 效果实现
-
registerEffectFactory
注册效果工厂(用于从配置创建效果)- Parameters:
effectName- 效果名称(对应配置中的 custom-effects 键)factory- 效果工厂
-
applySystemChange
-
isOnCooldown
检查国家是否在切换冷却中 -
getRemainingCooldown
获取剩余冷却时间(秒)
-