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

View file

@ -42,7 +42,7 @@ public final class MCTPAudio extends JavaPlugin {
saveConfig(); saveConfig();
Bukkit.getLogger().info("[MCTPAudio] Connecting with socket..."); 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(); client.connect();
Bukkit.getLogger().info("[MCTPAudio] Loading commands and events..."); 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 * Get a random item from this List
* *
* @return The random element * @return The random element, or null if empty
*/ */
public E getRandom() { public E getRandom() {
int size = size();
if (size <= 0) return null;
return get(r.nextInt(size())); return get(r.nextInt(size()));
} }

View file

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