浏览代码

mcMMO no longer throws errors on below 0 xp gains
Fixes #4346

nossr50 4 年之前
父节点
当前提交
22a738bace

+ 5 - 0
Changelog.txt

@@ -1,6 +1,11 @@
 Version 2.1.163
 Version 2.1.163
     Fixed the translate URL pointing to the wrong place (thanks chew)
     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
 Version 2.1.162
     Fixed a bug where Alchemy brew events were processed after setting brew results (thanks Wolf2323)
     Fixed a bug where Alchemy brew events were processed after setting brew results (thanks Wolf2323)

+ 1 - 3
src/main/java/com/gmail/nossr50/datatypes/player/McMMOPlayer.java

@@ -545,9 +545,7 @@ public class McMMOPlayer implements Identified {
      * @param xp Experience amount to process
      * @param xp Experience amount to process
      */
      */
     public void beginXpGain(PrimarySkillType skill, float xp, XPGainReason xpGainReason, XPGainSource xpGainSource) {
     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;
             return;
         }
         }
 
 

+ 1 - 0
src/main/java/com/gmail/nossr50/runnables/database/UUIDUpdateAsyncTask.java

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

+ 1 - 0
src/main/resources/upgrades.yml

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