1
mirror of https://github.com/CarmJos/MineConfiguration.git synced 2024-09-19 20:05:49 +00:00

chore(sound): 添加输入长度判断,适用于不想发送声音的情况。

This commit is contained in:
Carm Jos 2022-06-17 22:57:05 +08:00
parent d4c7124d9e
commit 8d723df7a6

View File

@ -85,7 +85,7 @@ public class SoundConfig {
@Contract("null -> null")
public static @Nullable SoundConfig deserialize(@Nullable String string) throws Exception {
if (string == null || string.length() == 0) return null;
if (string == null || string.isEmpty()) return null;
String[] args = string.contains(":") ? string.split(":") : new String[]{string};
if (args.length < 1) return null;