mcMMO no longer throws errors on below 0 xp gains

Fixes #4346
This commit is contained in:
nossr50 2020-12-16 16:15:19 -08:00
parent dfc2691cd6
commit 22a738bace
4 changed files with 8 additions and 3 deletions

View File

@ -1,6 +1,11 @@
Version 2.1.163
Fixed the translate URL pointing to the wrong place (thanks chew)
Fixed a bug where FlatFile databases would always attempt a UUID conversion task every save operation (every 10 minutes) causing console spam
mcMMO will no longer throw errors when incoming XP is below 0 (it will just silently cancel the operation)
NOTES:
I often test in SQL environments so I missed this bug, reminder to come bother me on discord if you find any annoying bugs!
Also work on T&C is going great lately, I feel great. Perhaps my depression is getting better!
Version 2.1.162
Fixed a bug where Alchemy brew events were processed after setting brew results (thanks Wolf2323)

View File

@ -545,9 +545,7 @@ public class McMMOPlayer implements Identified {
* @param xp Experience amount to process
*/
public void beginXpGain(PrimarySkillType skill, float xp, XPGainReason xpGainReason, XPGainSource xpGainSource) {
Validate.isTrue(xp >= 0.0, "XP gained should be greater than or equal to zero.");
if (xp <= 0.0) {
if(xp <= 0) {
return;
}

View File

@ -102,6 +102,7 @@ public class UUIDUpdateAsyncTask implements Runnable {
if (position == userNames.size()) {
mcMMO.getUpgradeManager().setUpgradeCompleted(UpgradeType.ADD_UUIDS);
awaiter.countDown();
plugin.getLogger().info("UUID checks completed");
} else
this.runTaskLaterAsynchronously(plugin, Misc.TICK_CONVERSION_FACTOR * DELAY_PERIOD); // Schedule next batch
}

View File

@ -10,3 +10,4 @@ Upgrades_Finished:
FIX_SPELLING_NETHERITE_SALVAGE: false
FIX_SPELLING_NETHERITE_REPAIR: false
FIX_NETHERITE_SALVAGE_QUANTITIES: false
ADD_UUIDS: false