diff --git a/Spigot-Server-Patches/0082-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch b/Spigot-Server-Patches/0082-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch index ddb0f1b47e..ce65f937de 100644 --- a/Spigot-Server-Patches/0082-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch +++ b/Spigot-Server-Patches/0082-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch @@ -1,4 +1,4 @@ -From 941df3324d3654d4b28b0eae444131154ec25ba0 Mon Sep 17 00:00:00 2001 +From 06f64c95ff6f0e07d8fffa60b551ecf7e32700a1 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 28 Mar 2016 19:55:45 -0400 Subject: [PATCH] Only process BlockPhysicsEvent if a plugin has a listener @@ -6,7 +6,7 @@ Subject: [PATCH] Only process BlockPhysicsEvent if a plugin has a listener Saves on some object allocation and processing when no plugin listens to this diff --git a/src/main/java/net/minecraft/server/BlockPlant.java b/src/main/java/net/minecraft/server/BlockPlant.java -index 0e4037ea21..736f794fd1 100644 +index 0e4037ea21..317ae16347 100644 --- a/src/main/java/net/minecraft/server/BlockPlant.java +++ b/src/main/java/net/minecraft/server/BlockPlant.java @@ -15,7 +15,7 @@ public class BlockPlant extends Block { @@ -14,7 +14,7 @@ index 0e4037ea21..736f794fd1 100644 // CraftBukkit start if (!iblockdata.canPlace(generatoraccess, blockposition)) { - if (!org.bukkit.craftbukkit.event.CraftEventFactory.callBlockPhysicsEvent(generatoraccess, blockposition).isCancelled()) { -+ if (generatoraccess instanceof WorldServer && ((WorldServer) generatoraccess).hasPhysicsEvent && !org.bukkit.craftbukkit.event.CraftEventFactory.callBlockPhysicsEvent(generatoraccess, blockposition).isCancelled()) { // Paper ++ if (!(generatoraccess instanceof WorldServer && ((WorldServer) generatoraccess).hasPhysicsEvent) || !org.bukkit.craftbukkit.event.CraftEventFactory.callBlockPhysicsEvent(generatoraccess, blockposition).isCancelled()) { // Paper return Blocks.AIR.getBlockData(); } } @@ -78,5 +78,5 @@ index aaeb888a8c..639068d2dc 100644 public EntityTracker tracker; private final PlayerChunkMap manager; -- -2.20.1 +2.21.0