refactor: run idea's "Code Cleanup"
This commit is contained in:
parent
efd837db36
commit
a45477ed1b
4 changed files with 5 additions and 6 deletions
|
@ -7,7 +7,6 @@ import me.chayapak1.chomens_bot.plugins.IRCPlugin;
|
|||
import me.chayapak1.chomens_bot.plugins.LoggerPlugin;
|
||||
import me.chayapak1.chomens_bot.util.*;
|
||||
import net.dv8tion.jda.api.requests.restaction.MessageCreateAction;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import org.yaml.snakeyaml.LoaderOptions;
|
||||
import org.yaml.snakeyaml.Yaml;
|
||||
import org.yaml.snakeyaml.constructor.Constructor;
|
||||
|
@ -20,7 +19,6 @@ import java.nio.file.Files;
|
|||
import java.nio.file.Path;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
|
|
|
@ -285,7 +285,7 @@ public class NBSConverter implements Converter {
|
|||
}
|
||||
}
|
||||
|
||||
private static List<String> sounds = loadJsonStringArray("sounds.json");
|
||||
private static final List<String> sounds = loadJsonStringArray("sounds.json");
|
||||
|
||||
private static List<String> loadJsonStringArray (String name) {
|
||||
List<String> list = new ArrayList<>();
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package me.chayapak1.chomens_bot.song;
|
||||
|
||||
import me.chayapak1.chomens_bot.Bot;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
||||
|
@ -107,12 +108,12 @@ public class SongPlayerConverter implements Converter {
|
|||
}
|
||||
|
||||
@Override
|
||||
public int read(byte b[]) throws IOException {
|
||||
public int read(byte @NotNull [] b) throws IOException {
|
||||
return read(b, 0, b.length);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int read(byte b[], int off, int len) throws IOException {
|
||||
public int read(byte @NotNull [] b, int off, int len) throws IOException {
|
||||
int i = original.read(b, off, len);
|
||||
if (i>=0) incrementCounter(i);
|
||||
return i;
|
||||
|
|
|
@ -70,9 +70,9 @@ public class JavaOpusEncoder {
|
|||
|
||||
public static OpusApplication getApplication(de.maxhenkel.opus4j.OpusEncoder.Application application) {
|
||||
return switch (application) {
|
||||
default -> OpusApplication.OPUS_APPLICATION_VOIP;
|
||||
case AUDIO -> OpusApplication.OPUS_APPLICATION_AUDIO;
|
||||
case LOW_DELAY -> OpusApplication.OPUS_APPLICATION_RESTRICTED_LOWDELAY;
|
||||
default -> OpusApplication.OPUS_APPLICATION_VOIP;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue