Merge branch 'dev' into 'master'
1.9.1 See merge request ajg0702/ajqueue!1
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
image: gradle:6.8.2-jdk8
|
||||
|
||||
# Cache downloaded dependencies and plugins between builds.
|
||||
# To keep cache across branches add 'key: "$CI_JOB_NAME"'
|
||||
cache:
|
||||
paths:
|
||||
- .gradle
|
||||
|
||||
|
||||
build:
|
||||
script:
|
||||
- gradle shadowJar
|
||||
artifacts:
|
||||
paths:
|
||||
- build/libs
|
||||
|
||||
pages:
|
||||
image: gradle:6.8.3-jdk15
|
||||
script:
|
||||
- gradle javadoc
|
||||
- mv build/docs/javadoc public
|
||||
artifacts:
|
||||
paths:
|
||||
- public
|
||||
+17
-2
@@ -1,10 +1,11 @@
|
||||
plugins {
|
||||
java
|
||||
id("com.github.johnrengelman.shadow").version("6.1.0")
|
||||
`maven-publish`
|
||||
}
|
||||
|
||||
|
||||
group = "us.ajg0702"
|
||||
version = "1.9.0"
|
||||
version = "1.9.1"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
@@ -26,6 +27,7 @@ dependencies {
|
||||
compileOnly("me.clip:placeholderapi:2.10.4")
|
||||
|
||||
implementation("us.ajg0702:ajUtils:1.0.0")
|
||||
implementation("org.bstats:bstats-bungeecord:2.2.1")
|
||||
}
|
||||
|
||||
tasks.withType<ProcessResources> {
|
||||
@@ -39,5 +41,18 @@ tasks.withType<ProcessResources> {
|
||||
|
||||
tasks.shadowJar {
|
||||
relocate("us.ajg0702.utils", "us.ajg0702.queue.utils")
|
||||
relocate("org.bstats", "us.ajg0702.bstats")
|
||||
archiveFileName.set("${baseName}-${version}.${extension}")
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
create<MavenPublication>("maven") {
|
||||
groupId = project.group.toString();
|
||||
artifactId = project.name
|
||||
version = project.version.toString()
|
||||
|
||||
from(components["java"])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -447,9 +447,12 @@ public class Manager {
|
||||
it.next().update();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the ideal server in a server group.
|
||||
* @param s The group to check
|
||||
* @param p The player to check
|
||||
* @return the ideal server
|
||||
*/
|
||||
public ServerInfo getIdealServer(QueueServer s, ProxiedPlayer p) {
|
||||
HashMap<ServerInfo, ServerPing> serverInfos = s.getLastPings();
|
||||
@@ -629,7 +632,7 @@ public class Manager {
|
||||
}
|
||||
|
||||
if(p.getServer().getInfo().getName().equals(s)) {
|
||||
p.sendMessage(msgs.getBC("errors.already-connected"));
|
||||
p.sendMessage(msgs.getBC("errors.already-connected", "SERVER:"+pl.aliases.getAlias(server.getName())));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -640,7 +643,7 @@ public class Manager {
|
||||
return;
|
||||
}
|
||||
if(!pl.config.getBoolean("allow-multiple-queues")) {
|
||||
p.sendMessage(msgs.getBC("status.left-last-queue"));
|
||||
p.sendMessage(msgs.getBC("status.left-last-queue", "SERVER:"+pl.aliases.getAlias(server.getName())));
|
||||
for(QueueServer ser : beforeQueues) {
|
||||
ser.getQueue().remove(p);
|
||||
}
|
||||
@@ -662,18 +665,24 @@ public class Manager {
|
||||
Logic.priorityLogic(server.getQueue(), s, p);
|
||||
} else {
|
||||
if((p.hasPermission("ajqueue.priority") || p.hasPermission("ajqueue.serverpriority."+s)) && list.size() > 0) {
|
||||
//p.sendMessage(Main.formatMessage("in priority"));
|
||||
int i = 0;
|
||||
for(ProxiedPlayer ply : list) {
|
||||
if(!(ply.hasPermission("ajqueue.priority") || ply.hasPermission("ajqueue.serverpriority."+s))) {
|
||||
//p.sendMessage(Main.formatMessage("Adding beind: "+i));
|
||||
list.add(i, p);
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
//p.sendMessage(Main.formatMessage("after loop"));
|
||||
if(list.size() == 0) {
|
||||
list.add(p);
|
||||
} else if(!list.contains(p)) {
|
||||
list.add(p);
|
||||
}
|
||||
} else {
|
||||
//p.sendMessage(Main.formatMessage("normal add"));
|
||||
list.add(p);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ public class Placeholders extends PlaceholderExpansion {
|
||||
* <br>Since version 2.9.1 can you use OfflinePlayers in your requests.
|
||||
*
|
||||
* @param player
|
||||
* A {@link org.bukkit.PkPlayer Player}.
|
||||
* A org.bukkit.PkPlayer Player.
|
||||
* @param identifier
|
||||
* A String containing the identifier/value.
|
||||
*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
name: ajQueue
|
||||
version: ${project.version}
|
||||
version: "@VERSION@"
|
||||
main: us.ajg0702.queue.Main
|
||||
author: ajgeiss0702
|
||||
@@ -1,5 +1,5 @@
|
||||
main: us.ajg0702.queue.spigot.Main
|
||||
version: ${project.version}
|
||||
version: "@VERSION@"
|
||||
api-version: 1.13
|
||||
author: ajgeiss0702
|
||||
name: ajQueue
|
||||
|
||||
Reference in New Issue
Block a user