Interface PoliticalEffect

All Known Implementing Classes:
ParticleEffect, SpeedBoostEffect

public interface PoliticalEffect
政体效果接口 - 预留实现接口,可通过扩展实现自定义效果

实现此接口以定义政体切换时的自定义行为。 例如:给全国玩家添加药水效果、修改城镇属性等。

  • Method Summary

    Modifier and Type
    Method
    Description
    获取效果的描述
    获取效果的唯一标识
    void
    onApply(com.palmergames.bukkit.towny.object.Nation nation)
    当国家采用此政体时触发
    void
    onRemove(com.palmergames.bukkit.towny.object.Nation nation)
    当国家放弃此政体时触发(切换到其他政体前)
  • Method Details

    • onApply

      void onApply(com.palmergames.bukkit.towny.object.Nation nation)
      当国家采用此政体时触发
      Parameters:
      nation - 采用政体的国家
    • onRemove

      void onRemove(com.palmergames.bukkit.towny.object.Nation nation)
      当国家放弃此政体时触发(切换到其他政体前)
      Parameters:
      nation - 放弃政体的国家
    • getId

      String getId()
      获取效果的唯一标识
      Returns:
      效果ID
    • getDescription

      String getDescription()
      获取效果的描述
      Returns:
      效果描述