From d4e763c30e38e7980f59191c7e2a871057e2ef71 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 6 Jun 2018 21:35:44 -0400 Subject: [PATCH] ParticleBuilder.hasReceivers shouldnt return true if no players are in the world --- .../Expand-World.spawnParticle-API-and-add-Builder.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Spigot-API-Patches/Expand-World.spawnParticle-API-and-add-Builder.patch b/Spigot-API-Patches/Expand-World.spawnParticle-API-and-add-Builder.patch index 34f3161474..596c2a0d9f 100644 --- a/Spigot-API-Patches/Expand-World.spawnParticle-API-and-add-Builder.patch +++ b/Spigot-API-Patches/Expand-World.spawnParticle-API-and-add-Builder.patch @@ -10,7 +10,7 @@ This adds a new Builder API which is much friendlier to use. diff --git a/src/main/java/com/destroystokyo/paper/ParticleBuilder.java b/src/main/java/com/destroystokyo/paper/ParticleBuilder.java new file mode 100644 -index 00000000..ef07ab3c +index 00000000..bf4edd07 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/ParticleBuilder.java @@ -0,0 +0,0 @@ @@ -96,7 +96,7 @@ index 00000000..ef07ab3c + * @return If this particle is going to be sent to someone + */ + public boolean hasReceivers() { -+ return receivers == null || !receivers.isEmpty(); ++ return (receivers == null && !location.getWorld().getPlayers().isEmpty()) || !receivers.isEmpty(); + } + + /**