Merge branch 'dev' into 'master'

2.2.1

See merge request ajg0702/ajqueue!34
This commit is contained in:
ajgeiss0702
2021-12-11 18:18:51 +00:00
12 changed files with 23 additions and 16 deletions
+1 -1
View File
@@ -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
View File
@@ -12,7 +12,7 @@ repositories {
}
allprojects {
version = "2.2.0"
version = "2.2.1"
group = "us.ajg0702"
plugins.apply("java")
+1 -1
View File
@@ -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,9 +119,12 @@ public class QueueManagerImpl implements QueueManager {
return false;
}
boolean enableBypassPaused = main.getConfig().getBoolean("enable-bypasspaused-permission");
if(server.isPaused() && main.getConfig().getBoolean("prevent-joining-paused")) {
player.sendMessage(msgs.getComponent("errors.cant-join-paused", "SERVER:"+server.getAlias()));
return false;
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());
@@ -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");
}
}
+1 -1
View File
@@ -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"))
+2 -2
View File
@@ -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")
@@ -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;
+1 -1
View File
@@ -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")
@@ -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();
}
@@ -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);
});
+1 -1
View File
@@ -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")
+1 -1
View File
@@ -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")