Check if it's greater then zero before scheduling the task

This commit is contained in:
TfT_02 2013-05-26 14:58:21 +02:00
parent 44770cf13b
commit 3525dc82b0
2 changed files with 2 additions and 1 deletions

View File

@ -368,7 +368,7 @@ public class mcMMO extends JavaPlugin {
}
// Clear the registered XP data so players can earn XP again
if (Config.getInstance().getExperienceDeminishedReturnsThreshold() > 0) {
if (Config.getInstance().getExperienceDeminishedReturnsTimeInterval() > 0 && Config.getInstance().getExperienceDeminishedReturnsThreshold() > 0) {
new ClearRegisteredXPGainTask().runTaskTimer(this, 60 * 20, 60 * 20);
}
}

View File

@ -286,6 +286,7 @@ Experience:
# Limit the amount of experience a player can earn:
# Threshold (amount of experience) per Time_Interval (in minutes)
# Setting one of these values to 0 or below will disable this feature.
Deminished_Returns:
Threshold: 20000
Time_Interval: 10