From feb2fd5e4363f08dd66afbf0936ae61d3f1d4903 Mon Sep 17 00:00:00 2001 From: 0x277F <0x277F@gmail.com> Date: Mon, 14 Mar 2016 20:15:54 -0600 Subject: [PATCH] SPIGOT-1930: Fix spam for EntityToggleGlideEvent --- nms-patches/EntityHuman.patch | 2 +- nms-patches/EntityLiving.patch | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nms-patches/EntityHuman.patch b/nms-patches/EntityHuman.patch index 38a51c8d00..bcd23a16b3 100644 --- a/nms-patches/EntityHuman.patch +++ b/nms-patches/EntityHuman.patch @@ -382,7 +382,7 @@ this.motY = d3 * 0.6D; this.aQ = f2; this.fallDistance = 0.0F; -+ if (!CraftEventFactory.callToggleGlideEvent(this, false).isCancelled()) // CraftBukkit ++ if (!getFlag(7) && !CraftEventFactory.callToggleGlideEvent(this, false).isCancelled()) // CraftBukkit this.setFlag(7, false); } else { super.g(f, f1); diff --git a/nms-patches/EntityLiving.patch b/nms-patches/EntityLiving.patch index 6ab6a64c22..64f3eaed25 100644 --- a/nms-patches/EntityLiving.patch +++ b/nms-patches/EntityLiving.patch @@ -506,7 +506,7 @@ } if (!this.world.isClientSide) { -+ if (!CraftEventFactory.callToggleGlideEvent(this, flag).isCancelled()) // CraftBukkit ++ if (flag != this.getFlag(7) && !CraftEventFactory.callToggleGlideEvent(this, flag).isCancelled()) // CraftBukkit this.setFlag(7, flag); }