mirror of
https://github.com/carm-outsource/TimeReward.git
synced 2024-09-19 19:25:49 +00:00
修正时间判断方式
This commit is contained in:
parent
826e5ffbad
commit
27fc19c7bf
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user