103 lines
3.9 KiB
Diff
103 lines
3.9 KiB
Diff
From 42577385d23a22d17b6f80787db0bf27f8e970d7 Mon Sep 17 00:00:00 2001
|
|
From: Jedediah Smith <jedediah@silencegreys.com>
|
|
Date: Tue, 16 Feb 2016 19:51:11 -0600
|
|
Subject: [PATCH] Player Tab List and Title APIs
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
|
index 9ebfa47..78fd6dc 100644
|
|
--- a/src/main/java/org/bukkit/entity/Player.java
|
|
+++ b/src/main/java/org/bukkit/entity/Player.java
|
|
@@ -344,6 +344,78 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
|
|
* @param components the components to send
|
|
*/
|
|
public void sendMessage(net.md_5.bungee.api.chat.BaseComponent... components);
|
|
+
|
|
+ /**
|
|
+ * Set the text displayed in the player list header and footer for this player
|
|
+ *
|
|
+ * @param header content for the top of the player list
|
|
+ * @param footer content for the bottom of the player list
|
|
+ */
|
|
+ public void setPlayerListHeaderFooter(net.md_5.bungee.api.chat.BaseComponent[] header, net.md_5.bungee.api.chat.BaseComponent[] footer);
|
|
+
|
|
+ /**
|
|
+ * Set the text displayed in the player list header and footer for this player
|
|
+ *
|
|
+ * @param header content for the top of the player list
|
|
+ * @param footer content for the bottom of the player list
|
|
+ */
|
|
+ public void setPlayerListHeaderFooter(net.md_5.bungee.api.chat.BaseComponent header, net.md_5.bungee.api.chat.BaseComponent footer);
|
|
+
|
|
+ /**
|
|
+ * Set the times for titles displayed to the player
|
|
+ *
|
|
+ * @param fadeInTicks ticks to fade-in
|
|
+ * @param stayTicks ticks to stay visible
|
|
+ * @param fadeOutTicks ticks to fade-out
|
|
+ */
|
|
+ public void setTitleTimes(int fadeInTicks, int stayTicks, int fadeOutTicks);
|
|
+
|
|
+ /**
|
|
+ * Set the subtitle of titles displayed to the player
|
|
+ */
|
|
+ public void setSubtitle(net.md_5.bungee.api.chat.BaseComponent[] subtitle);
|
|
+
|
|
+ /**
|
|
+ * Set the subtitle of titles displayed to the player
|
|
+ */
|
|
+ public void setSubtitle(net.md_5.bungee.api.chat.BaseComponent subtitle);
|
|
+
|
|
+ /**
|
|
+ * Show the given title to the player, along with the last subtitle set, using the last set times
|
|
+ */
|
|
+ public void showTitle(net.md_5.bungee.api.chat.BaseComponent[] title);
|
|
+
|
|
+ /**
|
|
+ * Show the given title to the player, along with the last subtitle set, using the last set times
|
|
+ */
|
|
+ public void showTitle(net.md_5.bungee.api.chat.BaseComponent title);
|
|
+
|
|
+ /**
|
|
+ * Show the given title and subtitle to the player using the given times
|
|
+ *
|
|
+ * @param title big text
|
|
+ * @param subtitle little text under it
|
|
+ * @param fadeInTicks ticks to fade-in
|
|
+ * @param stayTicks ticks to stay visible
|
|
+ * @param fadeOutTicks ticks to fade-out
|
|
+ */
|
|
+ public void showTitle(net.md_5.bungee.api.chat.BaseComponent[] title, net.md_5.bungee.api.chat.BaseComponent[] subtitle, int fadeInTicks, int stayTicks, int fadeOutTicks);
|
|
+
|
|
+ /**
|
|
+ * Show the given title and subtitle to the player using the given times
|
|
+ *
|
|
+ * @param title big text
|
|
+ * @param subtitle little text under it
|
|
+ * @param fadeInTicks ticks to fade-in
|
|
+ * @param stayTicks ticks to stay visible
|
|
+ * @param fadeOutTicks ticks to fade-out
|
|
+ */
|
|
+ public void showTitle(net.md_5.bungee.api.chat.BaseComponent title, net.md_5.bungee.api.chat.BaseComponent subtitle, int fadeInTicks, int stayTicks, int fadeOutTicks);
|
|
+
|
|
+ /**
|
|
+ * Hide any title that is currently visible to the player
|
|
+ */
|
|
+ public void hideTitle();
|
|
// Paper end
|
|
|
|
/**
|
|
@@ -1086,9 +1158,8 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
|
|
|
|
/**
|
|
* Resets the title displayed to the player.
|
|
- * @deprecated API subject to change.
|
|
*/
|
|
- @Deprecated
|
|
+ // Paper - Undeprecate
|
|
public void resetTitle();
|
|
|
|
// Spigot start
|
|
--
|
|
2.7.1
|
|
|