summaryrefslogtreecommitdiffstats
path: root/nms-patches/EntityPlayer.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches/EntityPlayer.patch')
-rw-r--r--nms-patches/EntityPlayer.patch31
1 files changed, 23 insertions, 8 deletions
diff --git a/nms-patches/EntityPlayer.patch b/nms-patches/EntityPlayer.patch
index b0098900..71dc7f66 100644
--- a/nms-patches/EntityPlayer.patch
+++ b/nms-patches/EntityPlayer.patch
@@ -422,23 +422,24 @@
this.playerConnection.sendPacket(new PacketPlayOutCloseWindow(this.activeContainer.windowId));
this.s();
}
-@@ -741,7 +916,16 @@
+@@ -741,8 +916,17 @@
public void triggerHealthUpdate() {
this.lastHealthSent = -1.0E8F;
+ this.lastSentExp = -1; // CraftBukkit - Added to reset
-+ }
-+
+ }
+
+ // CraftBukkit start - Support multi-line messages
+ public void sendMessage(IChatBaseComponent[] ichatbasecomponent) {
+ for (IChatBaseComponent component : ichatbasecomponent) {
+ this.sendMessage(component);
+ }
- }
++ }
+ // CraftBukkit end
-
++
public void b(IChatBaseComponent ichatbasecomponent) {
this.playerConnection.sendPacket(new PacketPlayOutChat(ichatbasecomponent));
+ }
@@ -802,6 +986,8 @@
}
@@ -486,10 +487,24 @@
}
public void a(EnumHand enumhand) {
-@@ -962,4 +1156,127 @@
+@@ -955,11 +1149,139 @@
+ }
+
+ public void M() {
++ if (!CraftEventFactory.callToggleGlideEvent(this, true).isCancelled()) // CraftBukkit
this.setFlag(7, true);
- this.setFlag(7, false);
}
+
+ public void N() {
+- this.setFlag(7, true);
+- this.setFlag(7, false);
++ // CraftBukkit start
++ if (!CraftEventFactory.callToggleGlideEvent(this, false).isCancelled()) {
++ this.setFlag(7, true);
++ this.setFlag(7, false);
++ }
++ // CraftBukkit end
++ }
+
+ // CraftBukkit start - Add per-player time and weather.
+ public long timeOffset = 0;
@@ -611,6 +626,6 @@
+ @Override
+ public CraftPlayer getBukkitEntity() {
+ return (CraftPlayer) super.getBukkitEntity();
-+ }
+ }
+ // CraftBukkit end
}