From 3525dc82b0d0b07c3f0534876e3090c351206db6 Mon Sep 17 00:00:00 2001 From: TfT_02 Date: Sun, 26 May 2013 14:58:21 +0200 Subject: [PATCH] Check if it's greater then zero before scheduling the task --- src/main/java/com/gmail/nossr50/mcMMO.java | 2 +- src/main/resources/config.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/mcMMO.java b/src/main/java/com/gmail/nossr50/mcMMO.java index f90db6374..c98725692 100644 --- a/src/main/java/com/gmail/nossr50/mcMMO.java +++ b/src/main/java/com/gmail/nossr50/mcMMO.java @@ -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); } } diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 23d4aa26e..122788874 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -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