Skip to content

Commit

Permalink
Updated to latest dependency versions
Browse files Browse the repository at this point in the history
Fixed bStats being years out of date
Attempted to fix issue #48 in PlayerBalancerAddon.
Added in the community coded velocity party and friends addon.
  • Loading branch information
BGHDDevelopment committed Jul 9, 2024
1 parent 0cb72aa commit 87e7b07
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 60 deletions.
6 changes: 3 additions & 3 deletions addon/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@
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 {
Expand All @@ -38,13 +40,18 @@ public void onPluginMessageReceived(String channel, Player player, byte[] messag
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 (iterator.hasNext()) {
iterator.next().accept(in);
iterator.remove();
);

if (consumers != null) {
synchronized (consumers) {
Iterator<Consumer<ByteArrayDataInput>> iterator = consumers.iterator();
if (iterator.hasNext()) {
iterator.next().accept(in);
iterator.remove();
}
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion balancer-velocity/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<parent>
<groupId>com.jaimemartz</groupId>
<version>2.3.5</version>
<version>2.3.6</version>
<artifactId>playerbalancer-parent</artifactId>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
@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 = {
Expand Down Expand Up @@ -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) {
Expand Down
6 changes: 3 additions & 3 deletions balancer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<parent>
<groupId>com.jaimemartz</groupId>
<version>2.3.5</version>
<version>2.3.6</version>
<artifactId>playerbalancer-parent</artifactId>
</parent>

Expand Down Expand Up @@ -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>
Expand All @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,18 @@
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;
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;
Expand Down
4 changes: 2 additions & 2 deletions partyandfriendsaddon-velocity/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down
8 changes: 4 additions & 4 deletions partyandfriendsaddon/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down
37 changes: 2 additions & 35 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down

0 comments on commit 87e7b07

Please sign in to comment.