Merge branch 'master' of github.com:mcMMO-Dev/mcMMO into tridentsxbows

This commit is contained in:
nossr50 2020-12-17 15:10:53 -08:00
commit abcf6413f5
10 changed files with 74 additions and 11 deletions

View File

@ -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

20
pom.xml
View File

@ -115,6 +115,7 @@
<include>net.kyori:adventure-text-serializer-legacy</include>
<include>net.kyori:adventure-text-serializer-bungeecord</include>
<include>net.kyori:adventure-text-serializer-craftbukkit</include>
<include>net.kyori:adventure-text-serializer-gson-legacy-impl</include>
<include>co.aikar:acf-bukkit</include>
<include>com.neetgames:mcMMO-API</include>
<include>com.neetgames:jmal</include>
@ -123,6 +124,10 @@
</artifactSet>
<!-- <dependencyReducedPomLocation>${project.build.directory}/dependency-reduced-pom.xml</dependencyReducedPomLocation>-->
<relocations>
<relocation>
<pattern>net.kyori.adventure</pattern>
<shadedPattern>com.gmail.nossr50.mcmmo.kyori.adventure</shadedPattern>
</relocation>
<relocation>
<pattern>com.neetgames.neetlib</pattern>
<shadedPattern>com.gmail.nossr50.neetlib</shadedPattern>
@ -147,10 +152,6 @@
<pattern>org.apache.tomcat</pattern>
<shadedPattern>com.gmail.nossr50.mcmmo.database.tomcat</shadedPattern>
</relocation>
<relocation>
<pattern>net.kyori.adventure</pattern>
<shadedPattern>com.gmail.nossr50.mcmmo.kyori.adventure</shadedPattern>
</relocation>
<relocation>
<pattern>org.bstats</pattern>
<shadedPattern>com.gmail.nossr50.mcmmo.metrics.bstat</shadedPattern>
@ -229,17 +230,17 @@
<dependency>
<groupId>net.kyori</groupId>
<artifactId>adventure-text-serializer-gson</artifactId>
<version>4.3.0-SNAPSHOT</version>
<version>4.3.0</version>
</dependency>
<dependency>
<groupId>net.kyori</groupId>
<artifactId>adventure-api</artifactId>
<version>4.2.0</version>
<version>4.3.0</version>
</dependency>
<dependency>
<groupId>net.kyori</groupId>
<artifactId>adventure-nbt</artifactId>
<version>4.2.0-SNAPSHOT</version>
<version>4.3.0</version>
</dependency>
<dependency>
<groupId>net.kyori</groupId>
@ -256,6 +257,11 @@
<artifactId>adventure-platform-common</artifactId>
<version>4.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>net.kyori</groupId>
<artifactId>adventure-text-serializer-gson-legacy-impl</artifactId>
<version>4.3.0</version>
</dependency>
<dependency>
<groupId>org.apache.maven.scm</groupId>
<artifactId>maven-scm-provider-gitexe</artifactId>

View File

@ -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;
}

View File

@ -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)
{

View File

@ -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();
}
}
}
}
}
}

View File

@ -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);
}

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

@ -113,6 +113,7 @@ public final class AlchemyPotionBrewer {
}
List<AlchemyPotion> 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) {

View File

@ -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();
}

View File

@ -11,3 +11,4 @@ Upgrades_Finished:
FIX_SPELLING_NETHERITE_REPAIR: false
FIX_NETHERITE_SALVAGE_QUANTITIES: false
ADD_SQL_2_2: false
ADD_UUIDS: false