Skip to content

Commit b89ab62

Browse files
committed
fix(skull): Reverted back to exception throw and not in-function try/catch block.
1 parent d23ab30 commit b89ab62

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/main/java/fr/hashtek/spigot/hashitem/HashSkull.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ public HashSkull setOwner(String playerName)
107107
* @return Returns itself.
108108
*/
109109
public HashSkull setTexture(String texture)
110+
throws NoSuchFieldException, IllegalAccessException
110111
{
111112
if (texture.isEmpty())
112113
return this;
@@ -116,13 +117,10 @@ public HashSkull setTexture(String texture)
116117

117118
profile.getProperties().put("textures", new Property("textures", texture));
118119

119-
try {
120-
final Field profileField = skullMeta.getClass().getDeclaredField("profile");
121-
profileField.setAccessible(true);
122-
profileField.set(skullMeta, profile);
123-
} catch (NoSuchFieldException | IllegalAccessException exception) {
124-
// TODO: Log this.
125-
}
120+
final Field profileField = skullMeta.getClass().getDeclaredField("profile");
121+
profileField.setAccessible(true);
122+
profileField.set(skullMeta, profile);
123+
126124
return this;
127125
}
128126

0 commit comments

Comments
 (0)