Updated to latest dependency versions

Fixed bStats being years out of date
Attempted to fix issue #48 in PlayerBalancerAddon.
Added in the community coded velocity party and friends addon.
This commit is contained in:
Stephan 2024-07-09 08:25:22 -07:00
parent 0cb72aa73d
commit 87e7b0727a
10 changed files with 31 additions and 59 deletions

View File

@ -7,7 +7,7 @@
<parent>
<groupId>com.jaimemartz</groupId>
<artifactId>playerbalancer-parent</artifactId>
<version>2.3.5</version>
<version>2.3.6</version>
</parent>
<artifactId>playerbalancer-addon</artifactId>
@ -29,13 +29,13 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.20.4-R0.1-SNAPSHOT</version>
<version>1.21-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>me.clip</groupId>
<artifactId>placeholderapi</artifactId>
<version>2.11.5</version>
<version>2.11.6</version>
<scope>provided</scope>
</dependency>
</dependencies>

View File

@ -17,7 +17,7 @@ public class PlayerBalancerAddon extends JavaPlugin {
private PluginMessageManager manager;
private PlayerBalancerPlaceholderExpansion expansion;
private ConfigurationFile config;
private String version = "2.3.5";
private String version = "2.3.6";
@Override
public void onEnable() {

View File

@ -9,9 +9,11 @@ import com.google.common.io.ByteStreams;
import org.bukkit.entity.Player;
import org.bukkit.plugin.messaging.PluginMessageListener;
import java.util.Collection;
import java.util.Iterator;
import java.util.Objects;
import java.util.UUID;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.function.Consumer;
public class PluginMessageManager implements PluginMessageListener {
@ -38,16 +40,21 @@ public class PluginMessageManager implements PluginMessageListener {
ByteArrayDataInput in = ByteStreams.newDataInput(message);
String subchannel = in.readUTF();
Iterator<Consumer<ByteArrayDataInput>> iterator = contexts.get(
Collection<Consumer<ByteArrayDataInput>> consumers = contexts.get(
new MessageContext(channel, subchannel, player.getUniqueId())
).iterator();
);
if (consumers != null) {
synchronized (consumers) {
Iterator<Consumer<ByteArrayDataInput>> iterator = consumers.iterator();
if (iterator.hasNext()) {
iterator.next().accept(in);
iterator.remove();
}
}
}
}
}
public void connectPlayer(Player player, String section) {
ByteArrayDataOutput out = ByteStreams.newDataOutput();

View File

@ -6,7 +6,7 @@
<parent>
<groupId>com.jaimemartz</groupId>
<version>2.3.5</version>
<version>2.3.6</version>
<artifactId>playerbalancer-parent</artifactId>
</parent>

View File

@ -53,7 +53,7 @@ import java.util.Optional;
@Plugin(
id = "playerbalancer",
name = "PlayerBalancer Velocity",
version = "2.3.5",
version = "2.3.6",
description = "PlayerBalancer is a plugin for setting up a network with multiple lobbies of different types.",
authors = {"jaime29010", "BGHDDevelopment", "HappyAreaBean"},
dependencies = {
@ -81,7 +81,7 @@ public class PlayerBalancer {
private final Metrics.Factory metricsFactory;
private final PluginContainer container;
private final Path dataDirectory;
private String version = "2.3.5";
private String version = "2.3.6";
@Inject
public PlayerBalancer(ProxyServer proxyServer, Logger logger, Metrics.Factory metricsFactory, PluginContainer container, @DataDirectory Path dataDirectory) {

View File

@ -6,7 +6,7 @@
<parent>
<groupId>com.jaimemartz</groupId>
<version>2.3.5</version>
<version>2.3.6</version>
<artifactId>playerbalancer-parent</artifactId>
</parent>
@ -62,7 +62,7 @@
<dependency>
<groupId>net.md-5</groupId>
<artifactId>bungeecord-proxy</artifactId>
<version>1.20-R0.3-SNAPSHOT</version>
<version>1.21-R0.1-SNAPSHOT</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
@ -88,7 +88,7 @@
<dependency>
<groupId>org.bstats</groupId>
<artifactId>bstats-bungeecord</artifactId>
<version>1.7</version>
<version>3.0.2</version>
<scope>compile</scope>
</dependency>
</dependencies>

View File

@ -15,7 +15,6 @@ import com.jaimemartz.playerbalancer.ping.StatusManager;
import com.jaimemartz.playerbalancer.section.SectionManager;
import com.jaimemartz.playerbalancer.settings.SettingsHolder;
import com.jaimemartz.playerbalancer.utils.CustomFormatter;
import net.md_5.bungee.api.CommandSender;
import net.md_5.bungee.api.plugin.Command;
import net.md_5.bungee.api.plugin.Listener;
import net.md_5.bungee.api.plugin.Plugin;
@ -23,12 +22,11 @@ import ninja.leaping.configurate.commented.CommentedConfigurationNode;
import ninja.leaping.configurate.hocon.HoconConfigurationLoader;
import ninja.leaping.configurate.loader.ConfigurationLoader;
import org.bstats.bungeecord.Metrics;
import org.bstats.bungeecord.Metrics.SingleLineChart;
import org.bstats.charts.SingleLineChart;
import java.io.*;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLConnection;
import java.nio.file.Files;
import java.util.logging.FileHandler;
import java.util.logging.Level;

View File

@ -6,7 +6,7 @@
<groupId>com.bghddevelopment.partyandfriendsaddon</groupId>
<artifactId>PBServerConnector-Velocity</artifactId>
<version>2.3.5</version>
<version>2.3.6</version>
<packaging>jar</packaging>
<name>PartyAndFriendsAddon-Velocity</name>
@ -63,7 +63,7 @@
<dependency>
<groupId>com.jaimemartz</groupId>
<artifactId>playerbalancer-velocity</artifactId>
<version>2.3.5</version>
<version>2.3.6</version>
<scope>provided</scope>
</dependency>
</dependencies>

View File

@ -6,7 +6,7 @@
<groupId>com.bghddevelopment.partyandfriendsaddon</groupId>
<artifactId>PBServerConnector</artifactId>
<version>2.3.5</version>
<version>2.3.6</version>
<packaging>jar</packaging>
<name>PartyAndFriendsAddon</name>
@ -77,21 +77,21 @@
<dependency>
<groupId>net.md-5</groupId>
<artifactId>bungeecord-api</artifactId>
<version>1.17-R0.1-SNAPSHOT</version>
<version>1.21-R0.1-SNAPSHOT</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.md-5</groupId>
<artifactId>bungeecord-api</artifactId>
<version>1.17-R0.1-SNAPSHOT</version>
<version>1.21-R0.1-SNAPSHOT</version>
<type>javadoc</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.jaimemartz</groupId>
<artifactId>playerbalancer</artifactId>
<version>2.3.5</version>
<version>2.3.6</version>
<scope>provided</scope>
</dependency>
</dependencies>

37
pom.xml
View File

@ -6,7 +6,7 @@
<groupId>com.jaimemartz</groupId>
<artifactId>playerbalancer-parent</artifactId>
<version>2.3.5</version>
<version>2.3.6</version>
<packaging>pom</packaging>
<modules>
@ -77,39 +77,6 @@
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
</plugin>
<!-- Not used ATM
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>aggregate</goal>
<goal>jar</goal>
</goals>
</execution>
</executions>
<configuration>
<show>public</show>
<failOnError>false</failOnError>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
@ -143,7 +110,7 @@
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.26</version>
<version>1.18.34</version>
<scope>provided</scope>
</dependency>
<dependency>