forked from ChomeNS/chomens-bot-java
LOL
This commit is contained in:
parent
394b20d818
commit
a5fb8a06f1
2 changed files with 4 additions and 4 deletions
|
@ -62,7 +62,7 @@ public class MusicPlayerPlugin extends Bot.Listener {
|
|||
bot.core.addListener(new CorePlugin.Listener() {
|
||||
public void ready () { coreReady(); }
|
||||
});
|
||||
bot.executor.scheduleAtFixedRate(() -> notesPerSecond = 0, 0, 1, TimeUnit.SECONDS);
|
||||
bot.executor.scheduleAtFixedRate(() -> notesPerSecond = 0, 0, 10, TimeUnit.SECONDS);
|
||||
}
|
||||
|
||||
public void loadSong (Path location) {
|
||||
|
@ -81,8 +81,8 @@ public class MusicPlayerPlugin extends Bot.Listener {
|
|||
}
|
||||
|
||||
public void loadSong (URL location) {
|
||||
if (loadings > 2) {
|
||||
bot.chat.tellraw(Component.text("Too many songs loading at once").color(NamedTextColor.RED));
|
||||
if (loadings > 7) {
|
||||
bot.chat.tellraw(Component.text("ohio").color(NamedTextColor.RED));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ public class SongLoaderRunnable implements Runnable {
|
|||
String name;
|
||||
try {
|
||||
if (isUrl) {
|
||||
bytes = DownloadUtilities.DownloadToByteArray(songUrl, 10*1024*1024);
|
||||
bytes = DownloadUtilities.DownloadToByteArray(songUrl, 5 * 1024 * 1024);
|
||||
name = Paths.get(songUrl.toURI().getPath()).getFileName().toString();
|
||||
|
||||
bot.music.loadings--;
|
||||
|
|
Loading…
Reference in a new issue