@@ -25,6 +25,7 @@ public class Functions {
2525
2626 /**
2727 * Replaces & to § in order to show colors properly.
28+ * @since 1.0
2829 * @param text String to format
2930 * @return Formatted string
3031 */
@@ -34,6 +35,7 @@ public static String formatColors(String text) {
3435
3536 /**
3637 * Gets access to a list of titles from a specific page.
38+ * @since 1.0
3739 * @param page GUI page
3840 * @return A set of titles
3941 */
@@ -43,6 +45,7 @@ public static Set<String> getTitlesFromPage(int page) {
4345
4446 /**
4547 * Gets a current user title from TAB API.
48+ * @since 1.0.7
4649 * @param player Player object
4750 * @return Current user title
4851 */
@@ -52,6 +55,7 @@ public static String getCurrentUserTitle(Player player) {
5255
5356 /**
5457 * Sets a specific texture for a player head.
58+ * @since 1.0
5559 * @param head ItemStack representation of a player head
5660 * @param value Head texture as Base64 value
5761 * @return ItemStack representation of a textured player head
@@ -74,6 +78,7 @@ public static ItemStack setHeadTexture(ItemStack head, String value) {
7478
7579 /**
7680 * Listens for errors and prints the details.
81+ * @since 1.0
7782 * @param player Player object
7883 * @param exception Exception object
7984 */
@@ -98,6 +103,7 @@ public static void handleErrors(Player player, Exception exception) {
98103
99104 /**
100105 * Sets the TAB above name for player.
106+ * @since 1.0
101107 * @param player Player representation
102108 * @param titleID Title ID from config
103109 * @param page Page number where the title appears
@@ -107,7 +113,7 @@ public static void setTitle(Player player, String titleID, int page) {
107113 Title title = new Title (titleID , page );
108114 Sound sound ;
109115 player .closeInventory ();
110- if (!getCurrentUserTitle (player ).equals (title .getFormattedValue ())) {
116+ if (!getCurrentUserTitle (player ).equals (title .getRawValue ())) {
111117 TABAPI .setValuePermanently (player .getUniqueId (), getHeadTitlePosition (), title .getRawValue ());
112118 player .sendMessage (getPrefixedLanguageVariable ("title-set" ));
113119 sound = Sound .ENTITY_LLAMA_SWAG ;
@@ -125,6 +131,7 @@ public static void setTitle(Player player, String titleID, int page) {
125131
126132 /**
127133 * Sets the raw value of a title for player.
134+ * @since 1.1.0
128135 * @param player Player representation
129136 * @param title Raw title value
130137 */
@@ -134,6 +141,7 @@ public static void setRawTitle(Player player, String title) {
134141
135142 /**
136143 * Removes the TAB above name from player.
144+ * @since 1.0
137145 * @param player Player representation
138146 * @param silent Whether to show the info for player or not
139147 */
@@ -161,6 +169,7 @@ public static void takeOff(Player player, boolean silent) {
161169
162170 /**
163171 * Gets the position of head title (abovename, belowname)
172+ * @since 1.0.6
164173 * @return Head title position as EnumProperty
165174 */
166175 public static EnumProperty getHeadTitlePosition () {
@@ -176,6 +185,7 @@ public static EnumProperty getHeadTitlePosition() {
176185
177186 /**
178187 * Gets the position of head title (abovename, belowname)
188+ * @since 1.0.6
179189 * @return Head title position as String
180190 */
181191 public static String getHeadTitlePositionAsString () {
@@ -184,6 +194,7 @@ public static String getHeadTitlePositionAsString() {
184194
185195 /**
186196 * Gets the title property name.
197+ * @since 1.1.2
187198 * @param page GUI page where the title appers
188199 * @param titleID Title ID
189200 * @param propertyName Property name
@@ -195,6 +206,7 @@ public static String getTitlePropertyName(int page, String titleID, String prope
195206
196207 /**
197208 * Gets the title GUI property name.
209+ * @since 1.1.2
198210 * @param page GUI page where the title appers
199211 * @param titleID Title ID
200212 * @param propertyName Property name
0 commit comments