ArriveRequirement.java 文件源码

java
阅读 25 收藏 0 点赞 0 评论 0

项目:QuestManager 作者:
@Override
public void fromConfig(ConfigurationSection config)
        throws InvalidConfigurationException {
    // same of Position Requirements's loading
    //  type: "arrr"
    //  range: [double]
    //  destination: [location]

    if (!config.contains("type") || !config.getString("type").equals("arrr")) {
        throw new InvalidConfigurationException();
    }

    this.desc = config.getString("description", "Arrive at the location");
    this.targetRange = config.getDouble("range", 1.0);
    this.destination = ((LocationState) config.get("destination")).getLocation();

}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号