diff options
author | md_5 <git@md-5.net> | 2016-12-16 09:48:14 +1100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2016-12-16 09:48:14 +1100 |
commit | 0a6a5cb4ad97482e62f612b56199fb85bffc2171 (patch) | |
tree | c54c0a933e7a89f6a90ba7e8c882a097d01c11e2 /src | |
parent | 655d8407ceabc7eaad4085790b0e308b46734aa3 (diff) | |
download | craftbukkit-0a6a5cb4ad97482e62f612b56199fb85bffc2171.tar craftbukkit-0a6a5cb4ad97482e62f612b56199fb85bffc2171.tar.gz craftbukkit-0a6a5cb4ad97482e62f612b56199fb85bffc2171.tar.lz craftbukkit-0a6a5cb4ad97482e62f612b56199fb85bffc2171.tar.xz craftbukkit-0a6a5cb4ad97482e62f612b56199fb85bffc2171.zip |
SPIGOT-1036: Add API to manipulate sendTitle timings.
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index 7c616c17..9f0b0654 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1364,6 +1364,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public void sendTitle(String title, String subtitle) { + sendTitle(title, subtitle, 10, 70, 20); + } + + @Override + public void sendTitle(String title, String subtitle, int fadeIn, int stay, int fadeOut) { if (title != null) { PacketPlayOutTitle packetTitle = new PacketPlayOutTitle(EnumTitleAction.TITLE, CraftChatMessage.fromString(title)[0]); getHandle().playerConnection.sendPacket(packetTitle); @@ -1373,6 +1378,9 @@ public class CraftPlayer extends CraftHumanEntity implements Player { PacketPlayOutTitle packetSubtitle = new PacketPlayOutTitle(EnumTitleAction.SUBTITLE, CraftChatMessage.fromString(subtitle)[0]); getHandle().playerConnection.sendPacket(packetSubtitle); } + + PacketPlayOutTitle times = new PacketPlayOutTitle(fadeIn, stay, fadeOut); + getHandle().playerConnection.sendPacket(times); } @Override |