diff --git a/Changelog.txt b/Changelog.txt
index ce8aa871f..3400a68fd 100644
--- a/Changelog.txt
+++ b/Changelog.txt
@@ -97,6 +97,24 @@ Version 2.2.000
Parties got unnecessarily complex in my absence, I have removed many party features in order to simplify parties and bring them closer to my vision. I have also added new features which should improve parties where it matters.
About the removed party features, all the features I removed I consider poor quality features and I don't think they belong in mcMMO. Feel free to yell at me in discord if you disagree.
I don't know what genius decided to make parties public by default, when I found out that parties had been changed to such a system I could barely contain my disgust. Parties are back to being private, you get invited by a party leader or party officer. That is the only way to join a party.
+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)
+ COTW Summoned entities are now removed when the chunk they are in is unloaded (prevents some exploits)
+
+ 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)
+
+Version 2.1.161
+ Fixed a bug where a bunch of text from mcMMO was never being sent and or being sent as blank messages
+
+ NOTES:
+ Adventure (the chat library we use) had an update that required shading in another new module, but there were no errors thrown without running a jvm debug flag and testing it, which is why I missed it. I also missed it because I don't read update notes very closely
Version 2.1.160
Fixed another 9+ year old exploit
Silenced a harmless "error" related to Rupture/Bleed often produced when using mcMMO and crazy enchantments together
diff --git a/pom.xml b/pom.xml
index a4b3d86bf..625f74d33 100755
--- a/pom.xml
+++ b/pom.xml
@@ -115,6 +115,7 @@
net.kyori:adventure-text-serializer-legacy
net.kyori:adventure-text-serializer-bungeecord
net.kyori:adventure-text-serializer-craftbukkit
+ net.kyori:adventure-text-serializer-gson-legacy-impl
co.aikar:acf-bukkit
com.neetgames:mcMMO-API
com.neetgames:jmal
@@ -123,6 +124,10 @@
+
+ net.kyori.adventure
+ com.gmail.nossr50.mcmmo.kyori.adventure
+
com.neetgames.neetlib
com.gmail.nossr50.neetlib
@@ -147,10 +152,6 @@
org.apache.tomcat
com.gmail.nossr50.mcmmo.database.tomcat
-
- net.kyori.adventure
- com.gmail.nossr50.mcmmo.kyori.adventure
-
org.bstats
com.gmail.nossr50.mcmmo.metrics.bstat
@@ -229,17 +230,17 @@
net.kyori
adventure-text-serializer-gson
- 4.3.0-SNAPSHOT
+ 4.3.0
net.kyori
adventure-api
- 4.2.0
+ 4.3.0
net.kyori
adventure-nbt
- 4.2.0-SNAPSHOT
+ 4.3.0
net.kyori
@@ -256,6 +257,11 @@
adventure-platform-common
4.0.0-SNAPSHOT
+
+ net.kyori
+ adventure-text-serializer-gson-legacy-impl
+ 4.3.0
+
org.apache.maven.scm
maven-scm-provider-gitexe
diff --git a/src/main/java/com/gmail/nossr50/datatypes/experience/ExperienceManager.java b/src/main/java/com/gmail/nossr50/datatypes/experience/ExperienceManager.java
index f8b0e669a..6ec1ce29a 100644
--- a/src/main/java/com/gmail/nossr50/datatypes/experience/ExperienceManager.java
+++ b/src/main/java/com/gmail/nossr50/datatypes/experience/ExperienceManager.java
@@ -125,8 +125,6 @@ public class ExperienceManager {
* @param xp Experience amount to process
*/
public void beginXpGain(@NotNull PrimarySkillType primarySkillType, float xp, @NotNull XPGainReason xpGainReason, @NotNull XPGainSource xpGainSource) {
- Validate.isTrue(xp >= 0.0, "XP gained should be greater than or equal to zero.");
-
if (xp <= 0.0) {
return;
}
diff --git a/src/main/java/com/gmail/nossr50/datatypes/json/McMMOUrl.java b/src/main/java/com/gmail/nossr50/datatypes/json/McMMOUrl.java
index 4f4886aeb..8d9d4e634 100644
--- a/src/main/java/com/gmail/nossr50/datatypes/json/McMMOUrl.java
+++ b/src/main/java/com/gmail/nossr50/datatypes/json/McMMOUrl.java
@@ -6,7 +6,7 @@ public class McMMOUrl {
public static final String urlPatreon = "https://www.patreon.com/nossr50";
public static final String urlWiki = "https://www.mcmmo.org/wiki/";
public static final String urlSpigot = "http://spigot.mcmmo.org";
- public static final String urlTranslate = "https://www.mcmmo.org/translate/";
+ public static final String urlTranslate = "https://translate.mcmmo.org/";
public static String getUrl(McMMOWebLinks webLinks)
{
diff --git a/src/main/java/com/gmail/nossr50/listeners/ChunkListener.java b/src/main/java/com/gmail/nossr50/listeners/ChunkListener.java
new file mode 100644
index 000000000..406a02436
--- /dev/null
+++ b/src/main/java/com/gmail/nossr50/listeners/ChunkListener.java
@@ -0,0 +1,30 @@
+package com.gmail.nossr50.listeners;
+
+import com.gmail.nossr50.mcMMO;
+import com.gmail.nossr50.util.compat.layers.persistentdata.MobMetaFlagType;
+import org.bukkit.entity.Entity;
+import org.bukkit.entity.LivingEntity;
+import org.bukkit.event.EventHandler;
+import org.bukkit.event.Listener;
+import org.bukkit.event.world.ChunkUnloadEvent;
+
+public class ChunkListener implements Listener {
+
+ @EventHandler(ignoreCancelled = true)
+ public void onChunkUnload(ChunkUnloadEvent event) {
+ for(Entity entity : event.getChunk().getEntities()) {
+ if(entity instanceof LivingEntity) {
+ LivingEntity livingEntity = (LivingEntity) entity;
+ if(mcMMO.getCompatibilityManager().getPersistentDataLayer().hasMobFlag(MobMetaFlagType.COTW_SUMMONED_MOB, livingEntity)) {
+
+ //Remove from existence
+ if(livingEntity.isValid()) {
+ mcMMO.getCompatibilityManager().getPersistentDataLayer().removeMobFlags(livingEntity);
+ livingEntity.setHealth(0);
+ livingEntity.remove();
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/src/main/java/com/gmail/nossr50/mcMMO.java b/src/main/java/com/gmail/nossr50/mcMMO.java
index afe8c7740..b9500ce67 100644
--- a/src/main/java/com/gmail/nossr50/mcMMO.java
+++ b/src/main/java/com/gmail/nossr50/mcMMO.java
@@ -559,6 +559,7 @@ public class mcMMO extends JavaPlugin {
pluginManager.registerEvents(new InventoryListener(this), this);
pluginManager.registerEvents(new SelfListener(this), this);
pluginManager.registerEvents(new WorldListener(this), this);
+ pluginManager.registerEvents(new ChunkListener(), this);
// pluginManager.registerEvents(new CommandListener(this), this);
}
diff --git a/src/main/java/com/gmail/nossr50/runnables/database/UUIDUpdateAsyncTask.java b/src/main/java/com/gmail/nossr50/runnables/database/UUIDUpdateAsyncTask.java
index 6c2c13822..fe87185aa 100644
--- a/src/main/java/com/gmail/nossr50/runnables/database/UUIDUpdateAsyncTask.java
+++ b/src/main/java/com/gmail/nossr50/runnables/database/UUIDUpdateAsyncTask.java
@@ -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
}
diff --git a/src/main/java/com/gmail/nossr50/skills/alchemy/AlchemyPotionBrewer.java b/src/main/java/com/gmail/nossr50/skills/alchemy/AlchemyPotionBrewer.java
index 9de4b6711..adc66999f 100644
--- a/src/main/java/com/gmail/nossr50/skills/alchemy/AlchemyPotionBrewer.java
+++ b/src/main/java/com/gmail/nossr50/skills/alchemy/AlchemyPotionBrewer.java
@@ -113,6 +113,7 @@ public final class AlchemyPotionBrewer {
}
List inputList = new ArrayList<>();
+ ItemStack[] outputList = new ItemStack[3];
for (int i = 0; i < 3; i++) {
ItemStack item = inventory.getItem(i);
@@ -127,7 +128,7 @@ public final class AlchemyPotionBrewer {
inputList.add(input);
if (output != null) {
- inventory.setItem(i, output.toItemStack(item.getAmount()).clone());
+ outputList[i] = output.toItemStack(item.getAmount()).clone();
}
}
@@ -138,6 +139,12 @@ public final class AlchemyPotionBrewer {
return;
}
+ for (int i = 0; i < 3; i++) {
+ if(outputList[i] != null) {
+ inventory.setItem(i, outputList[i]);
+ }
+ }
+
removeIngredient(inventory, player);
for (AlchemyPotion input : inputList) {
diff --git a/src/main/java/com/gmail/nossr50/skills/taming/TamingManager.java b/src/main/java/com/gmail/nossr50/skills/taming/TamingManager.java
index 907b76fe0..fb772a0da 100644
--- a/src/main/java/com/gmail/nossr50/skills/taming/TamingManager.java
+++ b/src/main/java/com/gmail/nossr50/skills/taming/TamingManager.java
@@ -570,6 +570,7 @@ public class TamingManager extends SkillManager {
//Remove from existence
if(livingEntity != null && livingEntity.isValid()) {
+ mcMMO.getCompatibilityManager().getPersistentDataLayer().removeMobFlags(livingEntity);
livingEntity.setHealth(0);
livingEntity.remove();
}
diff --git a/src/main/resources/upgrades.yml b/src/main/resources/upgrades.yml
index c4e861e15..ff54726c4 100644
--- a/src/main/resources/upgrades.yml
+++ b/src/main/resources/upgrades.yml
@@ -11,3 +11,4 @@ Upgrades_Finished:
FIX_SPELLING_NETHERITE_REPAIR: false
FIX_NETHERITE_SALVAGE_QUANTITIES: false
ADD_SQL_2_2: false
+ ADD_UUIDS: false