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

40
pom.xml
View file

@ -6,7 +6,7 @@
<groupId>me.mctp</groupId>
<artifactId>MCTPAudio</artifactId>
<version>1.4</version>
<version>1.5</version>
<packaging>jar</packaging>
<name>MCTPAudio</name>
@ -30,9 +30,9 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.9.0-SNAPSHOT</version>
<version>3.10.0</version>
<configuration>
<release>16</release>
<release>17</release>
<compilerArgs>
<arg>-parameters</arg>
</compilerArgs>
@ -96,8 +96,8 @@
<dependencies>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.17.1-R0.1-SNAPSHOT</version>
<artifactId>spigot</artifactId>
<version>1.18.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
@ -113,41 +113,41 @@
<dependency>
<groupId>com.sk89q.worldguard</groupId>
<artifactId>worldguard-bukkit</artifactId>
<version>7.0.6-SNAPSHOT</version>
<version>7.0.7-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.raidstone</groupId>
<artifactId>WorldGuardEvents</artifactId>
<version>1.16.4</version>
<version>1.18.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.8.0</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>com.googlecode.json-simple</groupId>-->
<!-- <artifactId>json-simple</artifactId>-->
<!-- <version>1.1.1</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>commons-io</groupId>-->
<!-- <artifactId>commons-io</artifactId>-->
<!-- <version>2.11.0</version>-->
<!-- </dependency>-->
<dependency>
<groupId>co.aikar</groupId>
<artifactId>acf-paper</artifactId>
<version>0.5.0-SNAPSHOT</version>
<version>0.5.1-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.bergerkiller.bukkit</groupId>
<artifactId>BKCommonLib</artifactId>
<version>1.17.1-v1-SNAPSHOT</version>
<version>1.18.1-v3</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.bergerkiller.bukkit</groupId>
<artifactId>TrainCarts</artifactId>
<version>1.17.1-v1-SNAPSHOT</version>
<version>1.18.1-v3</version>
<scope>provided</scope>
</dependency>
</dependencies>

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;