priority-messages
This commit is contained in:
@@ -17,7 +17,7 @@ dependencies {
|
|||||||
implementation("net.kyori:adventure-text-serializer-plain:4.0.0-SNAPSHOT")
|
implementation("net.kyori:adventure-text-serializer-plain:4.0.0-SNAPSHOT")
|
||||||
compileOnly("com.google.guava:guava:30.1.1-jre")
|
compileOnly("com.google.guava:guava:30.1.1-jre")
|
||||||
|
|
||||||
compileOnly("us.ajg0702:ajUtils:1.1.7")
|
compileOnly("us.ajg0702:ajUtils:1.1.8")
|
||||||
}
|
}
|
||||||
|
|
||||||
publishing {
|
publishing {
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ dependencies {
|
|||||||
compileOnly("net.kyori:adventure-text-serializer-plain:4.0.0-SNAPSHOT")
|
compileOnly("net.kyori:adventure-text-serializer-plain:4.0.0-SNAPSHOT")
|
||||||
|
|
||||||
compileOnly("com.google.guava:guava:30.1.1-jre")
|
compileOnly("com.google.guava:guava:30.1.1-jre")
|
||||||
compileOnly("us.ajg0702:ajUtils:1.1.7")
|
compileOnly("us.ajg0702:ajUtils:1.1.8")
|
||||||
|
|
||||||
compileOnly("org.slf4j:slf4j-log4j12:1.7.29")
|
compileOnly("org.slf4j:slf4j-log4j12:1.7.29")
|
||||||
|
|
||||||
|
|||||||
@@ -145,6 +145,17 @@ public class QueueManagerImpl implements QueueManager {
|
|||||||
"SERVERNAME:"+server.getName()
|
"SERVERNAME:"+server.getName()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
if(main.getConfig().getBoolean("enable-priority-messages")) {
|
||||||
|
for(String rawPriorityMessage : main.getConfig().getStringList("priority-messages")) {
|
||||||
|
String[] parts = rawPriorityMessage.split(":");
|
||||||
|
if(parts.length != 2) continue;
|
||||||
|
String level = parts[0];
|
||||||
|
String messageRaw = parts[1];
|
||||||
|
if(level.equals("*") || level.equals(queuePlayer.getPriority()+"")) {
|
||||||
|
player.sendMessage(main.getMessages().toComponent(messageRaw));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!server.isJoinable(player)) {
|
if(!server.isJoinable(player)) {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# Dont touch this number please
|
# Dont touch this number please
|
||||||
config-version: 22
|
config-version: 23
|
||||||
|
|
||||||
# The time the server will wait between sending people in the queue
|
# The time the server will wait between sending people in the queue
|
||||||
# Default: 5
|
# Default: 5
|
||||||
@@ -177,3 +177,16 @@ auto-add-kick-reasons:
|
|||||||
# This may require extra setup on bungeecord. See the wiki:
|
# This may require extra setup on bungeecord. See the wiki:
|
||||||
# https://wiki.ajg0702.us/ajqueue/setup/replacing-server-command
|
# https://wiki.ajg0702.us/ajqueue/setup/replacing-server-command
|
||||||
enable-server-command: false
|
enable-server-command: false
|
||||||
|
|
||||||
|
# Should we enable priority messages?
|
||||||
|
# Configure the priority messages in the option below.
|
||||||
|
enable-priority-messages: false
|
||||||
|
|
||||||
|
# Messages we send to players with priority queue when they join the queue
|
||||||
|
# In the free version, "priority" is 1.
|
||||||
|
# The * will send when a player joins with any priority.
|
||||||
|
# The format is <priority>:<message>
|
||||||
|
# Example: 1:You have a priority of 1!
|
||||||
|
priority-messages:
|
||||||
|
- "*:<green>Joining the queue with priority!"
|
||||||
|
- "100:<yellow>Wow! You have a priority of 100!"
|
||||||
@@ -18,7 +18,7 @@ dependencies {
|
|||||||
compileOnly("com.google.guava:guava:30.1.1-jre")
|
compileOnly("com.google.guava:guava:30.1.1-jre")
|
||||||
compileOnly("org.spongepowered:configurate-yaml:4.0.0")
|
compileOnly("org.spongepowered:configurate-yaml:4.0.0")
|
||||||
|
|
||||||
implementation("us.ajg0702:ajUtils:1.1.7")
|
implementation("us.ajg0702:ajUtils:1.1.8")
|
||||||
|
|
||||||
implementation(project(":platforms:velocity"))
|
implementation(project(":platforms:velocity"))
|
||||||
implementation(project(":platforms:bungeecord"))
|
implementation(project(":platforms:bungeecord"))
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ repositories {
|
|||||||
dependencies {
|
dependencies {
|
||||||
compileOnly("net.kyori:adventure-api:4.8.1")
|
compileOnly("net.kyori:adventure-api:4.8.1")
|
||||||
compileOnly("com.google.guava:guava:30.1.1-jre")
|
compileOnly("com.google.guava:guava:30.1.1-jre")
|
||||||
compileOnly("us.ajg0702:ajUtils:1.1.7")
|
compileOnly("us.ajg0702:ajUtils:1.1.8")
|
||||||
|
|
||||||
compileOnly("net.md-5:bungeecord-api:1.16-R0.4")
|
compileOnly("net.md-5:bungeecord-api:1.16-R0.4")
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ repositories {
|
|||||||
dependencies {
|
dependencies {
|
||||||
compileOnly("net.kyori:adventure-api:4.8.1")
|
compileOnly("net.kyori:adventure-api:4.8.1")
|
||||||
compileOnly("com.google.guava:guava:30.1.1-jre")
|
compileOnly("com.google.guava:guava:30.1.1-jre")
|
||||||
compileOnly("us.ajg0702:ajUtils:1.1.7")
|
compileOnly("us.ajg0702:ajUtils:1.1.8")
|
||||||
|
|
||||||
compileOnly("com.velocitypowered:velocity-api:3.0.0")
|
compileOnly("com.velocitypowered:velocity-api:3.0.0")
|
||||||
annotationProcessor("com.velocitypowered:velocity-api:3.0.0")
|
annotationProcessor("com.velocitypowered:velocity-api:3.0.0")
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ dependencies {
|
|||||||
|
|
||||||
compileOnly("com.google.guava:guava:30.1.1-jre")
|
compileOnly("com.google.guava:guava:30.1.1-jre")
|
||||||
|
|
||||||
compileOnly("us.ajg0702:ajUtils:1.1.7")
|
compileOnly("us.ajg0702:ajUtils:1.1.8")
|
||||||
|
|
||||||
compileOnly("net.kyori:adventure-api:4.8.1")
|
compileOnly("net.kyori:adventure-api:4.8.1")
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ dependencies {
|
|||||||
implementation("net.kyori:adventure-api:4.8.1")
|
implementation("net.kyori:adventure-api:4.8.1")
|
||||||
compileOnly("com.google.guava:guava:30.1.1-jre")
|
compileOnly("com.google.guava:guava:30.1.1-jre")
|
||||||
|
|
||||||
compileOnly("us.ajg0702:ajUtils:1.1.7")
|
compileOnly("us.ajg0702:ajUtils:1.1.8")
|
||||||
|
|
||||||
compileOnly(group = "org.spigotmc", name = "spigot", version = "1.16.5-R0.1-SNAPSHOT")
|
compileOnly(group = "org.spigotmc", name = "spigot", version = "1.16.5-R0.1-SNAPSHOT")
|
||||||
compileOnly("me.clip:placeholderapi:2.10.4")
|
compileOnly("me.clip:placeholderapi:2.10.4")
|
||||||
|
|||||||
Reference in New Issue
Block a user