@@ -35,7 +35,9 @@ public final class SkullBuilder extends AbstractItemBuilder<SkullBuilder> {
35
35
* @param uuid The {@link UUID} of the skull owner.
36
36
* @throws MojangApiException If the Mojang API returns an error.
37
37
* @throws IOException If an I/O error occurs.
38
+ * @deprecated Prefer using {@link SkullBuilder#SkullBuilder(HeadTexture)} with a hardcoded texture value instead of querying the Mojang API.
38
39
*/
40
+ @ Deprecated
39
41
public SkullBuilder (@ NotNull UUID uuid ) throws MojangApiException , IOException {
40
42
this (HeadTexture .of (uuid ));
41
43
}
@@ -46,7 +48,9 @@ public SkullBuilder(@NotNull UUID uuid) throws MojangApiException, IOException {
46
48
* @param username The username of the skull owner.
47
49
* @throws MojangApiException If the Mojang API returns an error.
48
50
* @throws IOException If an I/O error occurs.
51
+ * @deprecated Prefer using {@link SkullBuilder#SkullBuilder(HeadTexture)} with a hardcoded texture value instead of querying the Mojang API.
49
52
*/
53
+ @ Deprecated
50
54
public SkullBuilder (@ NotNull String username ) throws MojangApiException , IOException {
51
55
this (HeadTexture .of (username ));
52
56
}
@@ -140,7 +144,9 @@ public HeadTexture(@NotNull String textureValue) {
140
144
* @throws MojangApiException If the Mojang API returns an error.
141
145
* @throws IOException If an I/O error occurs.
142
146
* @see HeadTexture#of(UUID)
147
+ * @deprecated Prefer using {@link HeadTexture#HeadTexture(String)} with a hardcoded texture value instead of querying the Mojang API.
143
148
*/
149
+ @ Deprecated
144
150
public static @ NotNull HeadTexture of (@ NotNull OfflinePlayer offlinePlayer ) throws MojangApiException , IOException {
145
151
return of (offlinePlayer .getUniqueId ());
146
152
}
@@ -158,8 +164,9 @@ public HeadTexture(@NotNull String textureValue) {
158
164
* @throws MojangApiException If the Mojang API returns an error.
159
165
* @throws IOException If an I/O error occurs.
160
166
* @see HeadTexture#of(UUID)
167
+ * @deprecated Prefer using {@link HeadTexture#HeadTexture(String)} with a hardcoded texture value instead of querying the Mojang API.
161
168
*/
162
- @ SuppressWarnings ( "deprecation" )
169
+ @ Deprecated
163
170
public static @ NotNull HeadTexture of (@ NotNull String playerName ) throws MojangApiException , IOException {
164
171
if (Bukkit .getServer ().getOnlineMode ()) {
165
172
// if the server is in online mode, the Minecraft UUID cache (usercache.json) can be used
@@ -190,7 +197,9 @@ public HeadTexture(@NotNull String textureValue) {
190
197
* @return The {@link HeadTexture} of that player.
191
198
* @throws MojangApiException If the Mojang API returns an error.
192
199
* @throws IOException If an I/O error occurs.
200
+ * @deprecated Prefer using {@link HeadTexture#HeadTexture(String)} with a hardcoded texture value instead of querying the Mojang API.
193
201
*/
202
+ @ Deprecated
194
203
public static @ NotNull HeadTexture of (@ NotNull UUID uuid ) throws MojangApiException , IOException {
195
204
try {
196
205
return new HeadTexture (textureCache .get (uuid , () -> MojangApiUtils .getSkinData (uuid , false )[0 ]));
@@ -211,7 +220,10 @@ public HeadTexture(@NotNull String textureValue) {
211
220
* This means that when {@link HeadTexture#of(OfflinePlayer)}, {@link HeadTexture#of(UUID)}
212
221
* and {@link HeadTexture#of(String)} are called, these values will be pulled from the
213
222
* Mojang API again.
223
+ *
224
+ * @deprecated Prefer using {@link HeadTexture#HeadTexture(String)} with a hardcoded texture value instead of querying the Mojang API.
214
225
*/
226
+ @ Deprecated
215
227
public static void invalidateCache () {
216
228
uuidCache .invalidateAll ();
217
229
textureCache .invalidateAll ();
0 commit comments