Merge branch 'dev' into 'master'
2.2.1 See merge request ajg0702/ajqueue!34
This commit is contained in:
@@ -18,7 +18,7 @@ dependencies {
|
||||
implementation("net.kyori:adventure-text-serializer-plain:4.0.0-SNAPSHOT")
|
||||
compileOnly("com.google.guava:guava:30.1.1-jre")
|
||||
|
||||
compileOnly("us.ajg0702:ajUtils:1.1.16")
|
||||
compileOnly("us.ajg0702:ajUtils:1.1.17")
|
||||
}
|
||||
|
||||
publishing {
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ repositories {
|
||||
}
|
||||
|
||||
allprojects {
|
||||
version = "2.2.0"
|
||||
version = "2.2.1"
|
||||
group = "us.ajg0702"
|
||||
|
||||
plugins.apply("java")
|
||||
|
||||
@@ -18,7 +18,7 @@ dependencies {
|
||||
compileOnly("net.kyori:adventure-text-serializer-plain:4.0.0-SNAPSHOT")
|
||||
|
||||
compileOnly("com.google.guava:guava:30.1.1-jre")
|
||||
compileOnly("us.ajg0702:ajUtils:1.1.16")
|
||||
compileOnly("us.ajg0702:ajUtils:1.1.17")
|
||||
|
||||
compileOnly("org.slf4j:slf4j-log4j12:1.7.29")
|
||||
|
||||
|
||||
@@ -119,10 +119,13 @@ public class QueueManagerImpl implements QueueManager {
|
||||
return false;
|
||||
}
|
||||
|
||||
boolean enableBypassPaused = main.getConfig().getBoolean("enable-bypasspaused-permission");
|
||||
if(server.isPaused() && main.getConfig().getBoolean("prevent-joining-paused")) {
|
||||
if(!enableBypassPaused || !player.hasPermission("ajqueue.bypasspaused")) {
|
||||
player.sendMessage(msgs.getComponent("errors.cant-join-paused", "SERVER:"+server.getAlias()));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
List<AdaptedServer> notInServers = new ArrayList<>(server.getServers());
|
||||
notInServers.removeIf(adaptedServer -> !adaptedServer.getName().equals(player.getServerName()));
|
||||
@@ -430,6 +433,7 @@ public class QueueManagerImpl implements QueueManager {
|
||||
for (QueuePlayer queuePlayer : s.getQueue()) {
|
||||
AdaptedPlayer player = queuePlayer.getPlayer();
|
||||
if (player == null || !player.isConnected()) continue;
|
||||
if(player.getServerName() == null) continue;
|
||||
main.getPlatformMethods().sendPluginMessage(player, "inqueueevent", "true");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ dependencies {
|
||||
compileOnly("com.google.guava:guava:30.1.1-jre")
|
||||
compileOnly("org.spongepowered:configurate-yaml:4.0.0")
|
||||
|
||||
implementation("us.ajg0702:ajUtils:1.1.16")
|
||||
implementation("us.ajg0702:ajUtils:1.1.17")
|
||||
|
||||
implementation(project(":platforms:velocity"))
|
||||
implementation(project(":platforms:bungeecord"))
|
||||
|
||||
@@ -15,13 +15,13 @@ repositories {
|
||||
dependencies {
|
||||
compileOnly("net.kyori:adventure-api:4.8.1")
|
||||
compileOnly("com.google.guava:guava:30.1.1-jre")
|
||||
compileOnly("us.ajg0702:ajUtils:1.1.16")
|
||||
compileOnly("us.ajg0702:ajUtils:1.1.17")
|
||||
|
||||
compileOnly("net.md-5:bungeecord-api:1.16-R0.4")
|
||||
|
||||
implementation("net.kyori:adventure-text-minimessage:4.0.0-SNAPSHOT")
|
||||
|
||||
implementation("net.kyori:adventure-platform-bungeecord:4.0.0-SNAPSHOT")
|
||||
implementation("net.kyori:adventure-platform-bungeecord:4.0.0")
|
||||
compileOnly("net.kyori:adventure-text-serializer-plain:4.0.0-SNAPSHOT")
|
||||
|
||||
implementation("org.bstats:bstats-bungeecord:2.2.1")
|
||||
|
||||
+3
-1
@@ -37,8 +37,10 @@ public class BungeeServer implements AdaptedServer {
|
||||
CompletableFuture<AdaptedServerPing> future = new CompletableFuture<>();
|
||||
handle.ping((pp, error) -> {
|
||||
if(error != null) {
|
||||
future.complete(null);
|
||||
future.completeExceptionally(error);
|
||||
return;
|
||||
}
|
||||
|
||||
future.complete(new BungeeServerPing(pp));
|
||||
});
|
||||
return future;
|
||||
|
||||
@@ -15,7 +15,7 @@ repositories {
|
||||
dependencies {
|
||||
compileOnly("net.kyori:adventure-api:4.8.1")
|
||||
compileOnly("com.google.guava:guava:30.1.1-jre")
|
||||
compileOnly("us.ajg0702:ajUtils:1.1.16")
|
||||
compileOnly("us.ajg0702:ajUtils:1.1.17")
|
||||
|
||||
compileOnly("com.velocitypowered:velocity-api:3.0.0")
|
||||
annotationProcessor("com.velocitypowered:velocity-api:3.0.0")
|
||||
|
||||
+1
-1
@@ -106,7 +106,7 @@ public class VelocityPlayer implements AdaptedPlayer, Audience {
|
||||
@Override
|
||||
public String getServerName() {
|
||||
Optional<ServerConnection> serverConnection = handle.getCurrentServer();
|
||||
if(!serverConnection.isPresent()) return "none";
|
||||
if(!serverConnection.isPresent()) return null;
|
||||
ServerConnection connection = serverConnection.get();
|
||||
return connection.getServerInfo().getName();
|
||||
}
|
||||
|
||||
+4
-3
@@ -36,11 +36,12 @@ public class VelocityServer implements AdaptedServer {
|
||||
CompletableFuture<AdaptedServerPing> future = new CompletableFuture<>();
|
||||
CompletableFuture<ServerPing> serverPing = handle.ping();
|
||||
serverPing.thenRunAsync(() -> {
|
||||
AdaptedServerPing aPing = null;
|
||||
AdaptedServerPing aPing;
|
||||
try {
|
||||
aPing = new VelocityServerPing(serverPing.get());
|
||||
} catch (InterruptedException | ExecutionException e) {
|
||||
e.printStackTrace();
|
||||
} catch (Throwable e) {
|
||||
future.completeExceptionally(e);
|
||||
return;
|
||||
}
|
||||
future.complete(aPing);
|
||||
});
|
||||
|
||||
@@ -23,7 +23,7 @@ dependencies {
|
||||
|
||||
compileOnly("me.TechsCode:FakeUltraPerms:1.0.2")
|
||||
|
||||
compileOnly("us.ajg0702:ajUtils:1.1.16")
|
||||
compileOnly("us.ajg0702:ajUtils:1.1.17")
|
||||
|
||||
compileOnly("net.kyori:adventure-api:4.8.1")
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ dependencies {
|
||||
|
||||
compileOnly("org.spongepowered:configurate-yaml:4.0.0")
|
||||
|
||||
compileOnly("us.ajg0702:ajUtils:1.1.16")
|
||||
compileOnly("us.ajg0702:ajUtils:1.1.17")
|
||||
|
||||
compileOnly(group = "org.spigotmc", name = "spigot", version = "1.16.5-R0.1-SNAPSHOT")
|
||||
compileOnly("me.clip:placeholderapi:2.10.4")
|
||||
|
||||
Reference in New Issue
Block a user