summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/bukkit/entity/Player.java
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2016-12-16 09:48:08 +1100
committermd_5 <git@md-5.net>2016-12-16 09:48:08 +1100
commit703a1cf8353492f83c8b2c1bfd61bc618254c085 (patch)
tree42259de9fc1b423fc0350a2c2e0955072e54eecd /src/main/java/org/bukkit/entity/Player.java
parent1603bcf467683f1303dc6f2d5f95908deec1b74d (diff)
downloadbukkit-703a1cf8353492f83c8b2c1bfd61bc618254c085.tar
bukkit-703a1cf8353492f83c8b2c1bfd61bc618254c085.tar.gz
bukkit-703a1cf8353492f83c8b2c1bfd61bc618254c085.tar.lz
bukkit-703a1cf8353492f83c8b2c1bfd61bc618254c085.tar.xz
bukkit-703a1cf8353492f83c8b2c1bfd61bc618254c085.zip
SPIGOT-1036: Add API to manipulate sendTitle timings.
Diffstat (limited to 'src/main/java/org/bukkit/entity/Player.java')
-rw-r--r--src/main/java/org/bukkit/entity/Player.java27
1 files changed, 21 insertions, 6 deletions
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 4fa46f08..cd36fbbd 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1121,22 +1121,37 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
* values are null, they will not be sent and the display will remain
* unchanged. If they are empty strings, the display will be updated as
* such. If the strings contain a new line, only the first line will be
- * sent.
+ * sent. The titles will be displayed with the client's default timings.
*
* @param title Title text
* @param subtitle Subtitle text
- * @deprecated API subject to change
+ * @deprecated API behavior subject to change
*/
@Deprecated
public void sendTitle(String title, String subtitle);
/**
- * Resets the title displayed to the player.
- * @deprecated API subject to change.
+ * Sends a title and a subtitle message to the player. If either of these
+ * values are null, they will not be sent and the display will remain
+ * unchanged. If they are empty strings, the display will be updated as
+ * such. If the strings contain a new line, only the first line will be
+ * sent. All timings values may take a value of -1 to indicate that they
+ * will use the last value sent (or the defaults if no title has been
+ * displayed).
+ *
+ * @param title Title text
+ * @param subtitle Subtitle text
+ * @param fadeIn time in ticks for titles to fade in. Defaults to 10.
+ * @param stay time in ticks for titles to stay. Defaults to 70.
+ * @param fadeOut time in ticks for titles to fade out. Defaults to 20.
*/
- @Deprecated
- public void resetTitle();
+ public void sendTitle(String title, String subtitle, int fadeIn, int stay, int fadeOut);
+ /**
+ * Resets the title displayed to the player. This will clear the displayed
+ * title / subtitle and reset timings to their default values.
+ */
+ public void resetTitle();
/**
* Spawns the particle (the number of times specified by count)