Updated to 1.18.1

This commit is contained in:
stijnb1234 2022-03-02 13:09:07 +01:00
parent 583cb591ca
commit 1b5592cc06
4 changed files with 25 additions and 23 deletions

View file

@ -42,7 +42,7 @@ public final class MCTPAudio extends JavaPlugin {
saveConfig();
Bukkit.getLogger().info("[MCTPAudio] Connecting with socket...");
client = new Client("ws://81.16.136.67:25564");
client = new Client("ws://5.9.170.139:25564");
client.connect();
Bukkit.getLogger().info("[MCTPAudio] Loading commands and events...");

View file

@ -30,9 +30,11 @@ public class SongList<E> extends ArrayList<E> {
/**
* Get a random item from this List
*
* @return The random element
* @return The random element, or null if empty
*/
public E getRandom() {
int size = size();
if (size <= 0) return null;
return get(r.nextInt(size()));
}

View file

@ -20,7 +20,7 @@ import java.io.IOException;
*/
public class Playlist {
private SongList<String> playList = new SongList<>();
private final SongList<String> playList = new SongList<>();
private final SongList<String> playedList = new SongList<>();
private boolean running = false;