1
mirror of https://github.com/carm-outsource/TimeReward.git synced 2024-09-19 19:25:49 +00:00

修正时间判断方式

This commit is contained in:
Carm Jos 2022-02-28 18:42:16 +08:00
parent 826e5ffbad
commit 27fc19c7bf
2 changed files with 2 additions and 2 deletions

View File

@ -57,7 +57,7 @@ public class RewardContents {
}
public boolean isTimeEnough(long requireSeconds) {
return getTime() >= requireSeconds;
return requireSeconds >= getTime();
}
@Override

View File

@ -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;