1
0
mirror of https://github.com/GeyserMC/Geyser.git synced 2025-12-23 16:59:33 +00:00

Leniency when trimming incoming sound ids (#3852)

This commit is contained in:
Konicai
2023-06-09 21:30:03 -04:00
committed by GitHub
parent 1d99f8beb8
commit 049d64d34d

View File

@@ -79,8 +79,9 @@ public final class SoundUtils {
private static String trim(String identifier) {
// Drop any namespace if applicable
if (identifier.contains(":")) {
return identifier.split(":")[1];
int i = identifier.indexOf(':');
if (i >= 0) {
return identifier.substring(i + 1);
}
return identifier;
}