diff --git a/build.gradle.kts b/build.gradle.kts index ba2c0fe..24e3f36 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -5,7 +5,7 @@ plugins { } group = "us.ajg0702" -version = "1.9.6" +version = "1.9.7" repositories { mavenCentral() @@ -13,7 +13,7 @@ repositories { maven { url = uri("https://jitpack.io") } maven { url = uri("https://gitlab.com/api/v4/projects/19978391/packages/maven") } maven { url = uri("https://hub.spigotmc.org/nexus/content/repositories/snapshots/") } - maven { url = uri("http://repo.extendedclip.com/content/repositories/placeholderapi/") } + maven { url = uri("https://repo.extendedclip.com/content/repositories/placeholderapi/") } maven { url = uri("https://repo.codemc.org/repository/maven-public") } maven { url = uri("https://oss.sonatype.org/content/repositories/snapshots") } maven { url = uri("https://repo.codemc.io/repository/nms/") } @@ -23,7 +23,7 @@ repositories { dependencies { compileOnly("com.github.MyzelYam:PremiumVanishAPI:2.0.3") compileOnly("net.md-5:bungeecord-api:1.14-SNAPSHOT") - compileOnly(group = "org.spigotmc", name = "spigot", version = "1.16.4-R0.1-SNAPSHOT") + compileOnly(group = "org.spigotmc", name = "spigot", version = "1.16.5-R0.1-SNAPSHOT") compileOnly("me.clip:placeholderapi:2.10.4") implementation("us.ajg0702:ajUtils:1.0.0") diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index be52383..0f80bbf 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/main/java/us/ajg0702/queue/Manager.java b/src/main/java/us/ajg0702/queue/Manager.java index f1a544c..fd7c23b 100644 --- a/src/main/java/us/ajg0702/queue/Manager.java +++ b/src/main/java/us/ajg0702/queue/Manager.java @@ -209,7 +209,7 @@ public class Manager { * * Also creates/edits server groups */ - public void reloadServers() { + public synchronized void reloadServers() { if(pl.config == null) { pl.getLogger().warning("[MAN] Config is null"); } @@ -260,7 +260,7 @@ public class Manager { * Sends actionbar updates to all players in all queues with their * position in the queue and time remaining */ - public void sendActionBars() { + public synchronized void sendActionBars() { if(!pl.getConfig().getBoolean("send-actionbar")) return; for(ProxiedPlayer p : ProxyServer.getInstance().getPlayers()) { @@ -331,7 +331,7 @@ public class Manager { } - public void sendQueueEvents() { + public synchronized void sendQueueEvents() { for(Iterator it = servers.iterator(); it.hasNext();) { QueueServer s = it.next(); for(Iterator pit = s.getQueue().iterator(); pit.hasNext();) { @@ -344,7 +344,7 @@ public class Manager { * Sends the message to the player updating them on their position in the queue * along with their time remaining */ - public void sendMessages() { + public synchronized void sendMessages() { for(QueueServer s : servers) { List plys = s.getQueue(); Iterator it = plys.iterator(); @@ -364,7 +364,7 @@ public class Manager { * @param ply The player to send the message to * @param s The QueueServer the message should be about */ - public void sendMessage(ProxiedPlayer ply, QueueServer s) { + public synchronized void sendMessage(ProxiedPlayer ply, QueueServer s) { List plys = s.getQueue(); int pos = plys.indexOf(ply)+1; if(pos == 0) return; @@ -442,7 +442,7 @@ public class Manager { /** * Updates info about servers. */ - public void updateServers() { + public synchronized void updateServers() { Iterator it = servers.iterator(); while(it.hasNext()) { it.next().update();