1
mirror of https://github.com/carm-outsource/TimeReward.git synced 2026-06-04 15:28:16 +08:00

修正时间判断方式

This commit is contained in:
2022-02-28 18:42:16 +08:00
parent 826e5ffbad
commit 27fc19c7bf
2 changed files with 2 additions and 2 deletions
@@ -57,7 +57,7 @@ public class RewardContents {
}
public boolean isTimeEnough(long requireSeconds) {
return getTime() >= requireSeconds;
return requireSeconds >= getTime();
}
@Override
@@ -53,7 +53,7 @@ public class RewardManager {
for (String rewardID : section.getKeys(false)) {
ConfigurationSection rewardSection = section.getConfigurationSection(rewardID);
if (rewardSection == null) continue;
long time = rewardSection.getLong("time");
long time = rewardSection.getLong("time", -1);
if (time <= 0) {
Main.severe("奖励 " + rewardID + " 的时间配置错误,请检查配置文件。");
continue;