mirror of
https://github.com/BGHDDevelopment/PlayerBalancer.git
synced 2025-02-11 09:41:19 +01:00
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:
parent
0cb72aa73d
commit
87e7b0727a
@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.jaimemartz</groupId>
|
<groupId>com.jaimemartz</groupId>
|
||||||
<artifactId>playerbalancer-parent</artifactId>
|
<artifactId>playerbalancer-parent</artifactId>
|
||||||
<version>2.3.5</version>
|
<version>2.3.6</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>playerbalancer-addon</artifactId>
|
<artifactId>playerbalancer-addon</artifactId>
|
||||||
@ -29,13 +29,13 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.spigotmc</groupId>
|
<groupId>org.spigotmc</groupId>
|
||||||
<artifactId>spigot-api</artifactId>
|
<artifactId>spigot-api</artifactId>
|
||||||
<version>1.20.4-R0.1-SNAPSHOT</version>
|
<version>1.21-R0.1-SNAPSHOT</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>me.clip</groupId>
|
<groupId>me.clip</groupId>
|
||||||
<artifactId>placeholderapi</artifactId>
|
<artifactId>placeholderapi</artifactId>
|
||||||
<version>2.11.5</version>
|
<version>2.11.6</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
@ -17,7 +17,7 @@ public class PlayerBalancerAddon extends JavaPlugin {
|
|||||||
private PluginMessageManager manager;
|
private PluginMessageManager manager;
|
||||||
private PlayerBalancerPlaceholderExpansion expansion;
|
private PlayerBalancerPlaceholderExpansion expansion;
|
||||||
private ConfigurationFile config;
|
private ConfigurationFile config;
|
||||||
private String version = "2.3.5";
|
private String version = "2.3.6";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
|
@ -9,9 +9,11 @@ import com.google.common.io.ByteStreams;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.plugin.messaging.PluginMessageListener;
|
import org.bukkit.plugin.messaging.PluginMessageListener;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
import java.util.concurrent.ConcurrentLinkedQueue;
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
public class PluginMessageManager implements PluginMessageListener {
|
public class PluginMessageManager implements PluginMessageListener {
|
||||||
@ -38,16 +40,21 @@ public class PluginMessageManager implements PluginMessageListener {
|
|||||||
ByteArrayDataInput in = ByteStreams.newDataInput(message);
|
ByteArrayDataInput in = ByteStreams.newDataInput(message);
|
||||||
String subchannel = in.readUTF();
|
String subchannel = in.readUTF();
|
||||||
|
|
||||||
Iterator<Consumer<ByteArrayDataInput>> iterator = contexts.get(
|
Collection<Consumer<ByteArrayDataInput>> consumers = contexts.get(
|
||||||
new MessageContext(channel, subchannel, player.getUniqueId())
|
new MessageContext(channel, subchannel, player.getUniqueId())
|
||||||
).iterator();
|
);
|
||||||
|
|
||||||
|
if (consumers != null) {
|
||||||
|
synchronized (consumers) {
|
||||||
|
Iterator<Consumer<ByteArrayDataInput>> iterator = consumers.iterator();
|
||||||
if (iterator.hasNext()) {
|
if (iterator.hasNext()) {
|
||||||
iterator.next().accept(in);
|
iterator.next().accept(in);
|
||||||
iterator.remove();
|
iterator.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void connectPlayer(Player player, String section) {
|
public void connectPlayer(Player player, String section) {
|
||||||
ByteArrayDataOutput out = ByteStreams.newDataOutput();
|
ByteArrayDataOutput out = ByteStreams.newDataOutput();
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.jaimemartz</groupId>
|
<groupId>com.jaimemartz</groupId>
|
||||||
<version>2.3.5</version>
|
<version>2.3.6</version>
|
||||||
<artifactId>playerbalancer-parent</artifactId>
|
<artifactId>playerbalancer-parent</artifactId>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ import java.util.Optional;
|
|||||||
@Plugin(
|
@Plugin(
|
||||||
id = "playerbalancer",
|
id = "playerbalancer",
|
||||||
name = "PlayerBalancer Velocity",
|
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.",
|
description = "PlayerBalancer is a plugin for setting up a network with multiple lobbies of different types.",
|
||||||
authors = {"jaime29010", "BGHDDevelopment", "HappyAreaBean"},
|
authors = {"jaime29010", "BGHDDevelopment", "HappyAreaBean"},
|
||||||
dependencies = {
|
dependencies = {
|
||||||
@ -81,7 +81,7 @@ public class PlayerBalancer {
|
|||||||
private final Metrics.Factory metricsFactory;
|
private final Metrics.Factory metricsFactory;
|
||||||
private final PluginContainer container;
|
private final PluginContainer container;
|
||||||
private final Path dataDirectory;
|
private final Path dataDirectory;
|
||||||
private String version = "2.3.5";
|
private String version = "2.3.6";
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public PlayerBalancer(ProxyServer proxyServer, Logger logger, Metrics.Factory metricsFactory, PluginContainer container, @DataDirectory Path dataDirectory) {
|
public PlayerBalancer(ProxyServer proxyServer, Logger logger, Metrics.Factory metricsFactory, PluginContainer container, @DataDirectory Path dataDirectory) {
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.jaimemartz</groupId>
|
<groupId>com.jaimemartz</groupId>
|
||||||
<version>2.3.5</version>
|
<version>2.3.6</version>
|
||||||
<artifactId>playerbalancer-parent</artifactId>
|
<artifactId>playerbalancer-parent</artifactId>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
@ -62,7 +62,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.md-5</groupId>
|
<groupId>net.md-5</groupId>
|
||||||
<artifactId>bungeecord-proxy</artifactId>
|
<artifactId>bungeecord-proxy</artifactId>
|
||||||
<version>1.20-R0.3-SNAPSHOT</version>
|
<version>1.21-R0.1-SNAPSHOT</version>
|
||||||
<type>jar</type>
|
<type>jar</type>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
@ -88,7 +88,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.bstats</groupId>
|
<groupId>org.bstats</groupId>
|
||||||
<artifactId>bstats-bungeecord</artifactId>
|
<artifactId>bstats-bungeecord</artifactId>
|
||||||
<version>1.7</version>
|
<version>3.0.2</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
@ -15,7 +15,6 @@ import com.jaimemartz.playerbalancer.ping.StatusManager;
|
|||||||
import com.jaimemartz.playerbalancer.section.SectionManager;
|
import com.jaimemartz.playerbalancer.section.SectionManager;
|
||||||
import com.jaimemartz.playerbalancer.settings.SettingsHolder;
|
import com.jaimemartz.playerbalancer.settings.SettingsHolder;
|
||||||
import com.jaimemartz.playerbalancer.utils.CustomFormatter;
|
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.Command;
|
||||||
import net.md_5.bungee.api.plugin.Listener;
|
import net.md_5.bungee.api.plugin.Listener;
|
||||||
import net.md_5.bungee.api.plugin.Plugin;
|
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.hocon.HoconConfigurationLoader;
|
||||||
import ninja.leaping.configurate.loader.ConfigurationLoader;
|
import ninja.leaping.configurate.loader.ConfigurationLoader;
|
||||||
import org.bstats.bungeecord.Metrics;
|
import org.bstats.bungeecord.Metrics;
|
||||||
import org.bstats.bungeecord.Metrics.SingleLineChart;
|
import org.bstats.charts.SingleLineChart;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.net.HttpURLConnection;
|
import java.net.HttpURLConnection;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.net.URLConnection;
|
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.util.logging.FileHandler;
|
import java.util.logging.FileHandler;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>com.bghddevelopment.partyandfriendsaddon</groupId>
|
<groupId>com.bghddevelopment.partyandfriendsaddon</groupId>
|
||||||
<artifactId>PBServerConnector-Velocity</artifactId>
|
<artifactId>PBServerConnector-Velocity</artifactId>
|
||||||
<version>2.3.5</version>
|
<version>2.3.6</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>PartyAndFriendsAddon-Velocity</name>
|
<name>PartyAndFriendsAddon-Velocity</name>
|
||||||
@ -63,7 +63,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.jaimemartz</groupId>
|
<groupId>com.jaimemartz</groupId>
|
||||||
<artifactId>playerbalancer-velocity</artifactId>
|
<artifactId>playerbalancer-velocity</artifactId>
|
||||||
<version>2.3.5</version>
|
<version>2.3.6</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>com.bghddevelopment.partyandfriendsaddon</groupId>
|
<groupId>com.bghddevelopment.partyandfriendsaddon</groupId>
|
||||||
<artifactId>PBServerConnector</artifactId>
|
<artifactId>PBServerConnector</artifactId>
|
||||||
<version>2.3.5</version>
|
<version>2.3.6</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>PartyAndFriendsAddon</name>
|
<name>PartyAndFriendsAddon</name>
|
||||||
@ -77,21 +77,21 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.md-5</groupId>
|
<groupId>net.md-5</groupId>
|
||||||
<artifactId>bungeecord-api</artifactId>
|
<artifactId>bungeecord-api</artifactId>
|
||||||
<version>1.17-R0.1-SNAPSHOT</version>
|
<version>1.21-R0.1-SNAPSHOT</version>
|
||||||
<type>jar</type>
|
<type>jar</type>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.md-5</groupId>
|
<groupId>net.md-5</groupId>
|
||||||
<artifactId>bungeecord-api</artifactId>
|
<artifactId>bungeecord-api</artifactId>
|
||||||
<version>1.17-R0.1-SNAPSHOT</version>
|
<version>1.21-R0.1-SNAPSHOT</version>
|
||||||
<type>javadoc</type>
|
<type>javadoc</type>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.jaimemartz</groupId>
|
<groupId>com.jaimemartz</groupId>
|
||||||
<artifactId>playerbalancer</artifactId>
|
<artifactId>playerbalancer</artifactId>
|
||||||
<version>2.3.5</version>
|
<version>2.3.6</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
37
pom.xml
37
pom.xml
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>com.jaimemartz</groupId>
|
<groupId>com.jaimemartz</groupId>
|
||||||
<artifactId>playerbalancer-parent</artifactId>
|
<artifactId>playerbalancer-parent</artifactId>
|
||||||
<version>2.3.5</version>
|
<version>2.3.6</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
@ -77,39 +77,6 @@
|
|||||||
<artifactId>maven-jar-plugin</artifactId>
|
<artifactId>maven-jar-plugin</artifactId>
|
||||||
<version>3.0.2</version>
|
<version>3.0.2</version>
|
||||||
</plugin>
|
</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>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-shade-plugin</artifactId>
|
<artifactId>maven-shade-plugin</artifactId>
|
||||||
@ -143,7 +110,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.projectlombok</groupId>
|
<groupId>org.projectlombok</groupId>
|
||||||
<artifactId>lombok</artifactId>
|
<artifactId>lombok</artifactId>
|
||||||
<version>1.18.26</version>
|
<version>1.18.34</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
Loading…
Reference in New Issue
Block a user