mirror of
https://github.com/GeyserMC/MCProtocolLib.git
synced 2024-12-04 21:01:02 -05:00
Icon conversion methods no longer throw IOException.
This commit is contained in:
parent
1840d5aa3d
commit
9249cb02d7
1 changed files with 2 additions and 2 deletions
|
@ -95,7 +95,7 @@ public class StatusResponsePacket implements Packet {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private byte[] stringToIcon(String str) throws IOException {
|
private byte[] stringToIcon(String str) {
|
||||||
if(str.startsWith("data:image/png;base64,")) {
|
if(str.startsWith("data:image/png;base64,")) {
|
||||||
str = str.substring("data:image/png;base64,".length());
|
str = str.substring("data:image/png;base64,".length());
|
||||||
}
|
}
|
||||||
|
@ -103,7 +103,7 @@ public class StatusResponsePacket implements Packet {
|
||||||
return Base64.decode(str.getBytes(StandardCharsets.UTF_8));
|
return Base64.decode(str.getBytes(StandardCharsets.UTF_8));
|
||||||
}
|
}
|
||||||
|
|
||||||
private String iconToString(byte[] icon) throws IOException {
|
private String iconToString(byte[] icon) {
|
||||||
return "data:image/png;base64," + new String(Base64.encode(icon), StandardCharsets.UTF_8);
|
return "data:image/png;base64," + new String(Base64.encode(icon), StandardCharsets.UTF_8);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue