mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-06 15:12:13 -07:00
SPIGOT-1571: Add Entity Glide Events.
This commit is contained in:
@@ -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 @@
|
||||
this.setFlag(7, true);
|
||||
this.setFlag(7, false);
|
||||
@@ -955,11 +1149,139 @@
|
||||
}
|
||||
|
||||
public void M() {
|
||||
+ if (!CraftEventFactory.callToggleGlideEvent(this, true).isCancelled()) // CraftBukkit
|
||||
this.setFlag(7, true);
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
Reference in New Issue
Block a user