mirror of
https://github.com/CarmJos/MineConfiguration.git
synced 2024-09-19 20:05:49 +00:00
chore(sound): 添加输入长度判断,适用于不想发送声音的情况。
This commit is contained in:
parent
2804543419
commit
d4c7124d9e
@ -85,7 +85,7 @@ public class SoundConfig {
|
||||
|
||||
@Contract("null -> null")
|
||||
public static @Nullable SoundConfig deserialize(@Nullable String string) throws Exception {
|
||||
if (string == null) return null;
|
||||
if (string == null || string.length() == 0) return null;
|
||||
|
||||
String[] args = string.contains(":") ? string.split(":") : new String[]{string};
|
||||
if (args.length < 1) return null;
|
||||
|
Loading…
Reference in New Issue
Block a user