Paper/Spigot-Server-Patches/0546-Fix-incorrect-return-for-WorldServer-addAllEntitiesS.patch
Daniel Ennis e792da723a
Updated Upstream (Bukkit/CraftBukkit/Spigot) (#4728)
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
30885166 Update to Minecraft 1.16.4

CraftBukkit Changes:
3af81c71 Update to Minecraft 1.16.4

Spigot Changes:
f011ca24 Update to Minecraft 1.16.4

Co-authored-by: Mariell Hoversholm <proximyst@proximyst.com>
2020-11-02 20:22:15 -06:00

24 lines
1.1 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
Date: Sat, 15 Aug 2020 09:32:00 -0500
Subject: [PATCH] Fix incorrect return for WorldServer#addAllEntitiesSafely
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 1642bb724032530f6ecbc849f449b93e7c450873..d3a6247d6c8e566be11b8b2a3520b001fbdc2d42 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1261,7 +1261,11 @@ public class WorldServer extends World implements GeneratorAccessSeed {
if (entity.cp().anyMatch(this::isUUIDTaken)) {
return false;
} else {
- return this.addAllEntities(entity, reason); // CraftBukkit
+ // Paper start - this method is _only_ designed to return false on duplicate uuids
+ // fixes issues with things such as a plugin cancelling spawn of a /summon
+ this.addAllEntities(entity, reason); // CraftBukkit
+ return true;
+ // Paper end
}
}