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
|
||||||
+16
-1
@@ -1,10 +1,11 @@
|
|||||||
plugins {
|
plugins {
|
||||||
java
|
java
|
||||||
id("com.github.johnrengelman.shadow").version("6.1.0")
|
id("com.github.johnrengelman.shadow").version("6.1.0")
|
||||||
|
`maven-publish`
|
||||||
}
|
}
|
||||||
|
|
||||||
group = "us.ajg0702"
|
group = "us.ajg0702"
|
||||||
version = "1.9.0"
|
version = "1.9.1"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
@@ -26,6 +27,7 @@ dependencies {
|
|||||||
compileOnly("me.clip:placeholderapi:2.10.4")
|
compileOnly("me.clip:placeholderapi:2.10.4")
|
||||||
|
|
||||||
implementation("us.ajg0702:ajUtils:1.0.0")
|
implementation("us.ajg0702:ajUtils:1.0.0")
|
||||||
|
implementation("org.bstats:bstats-bungeecord:2.2.1")
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType<ProcessResources> {
|
tasks.withType<ProcessResources> {
|
||||||
@@ -39,5 +41,18 @@ tasks.withType<ProcessResources> {
|
|||||||
|
|
||||||
tasks.shadowJar {
|
tasks.shadowJar {
|
||||||
relocate("us.ajg0702.utils", "us.ajg0702.queue.utils")
|
relocate("us.ajg0702.utils", "us.ajg0702.queue.utils")
|
||||||
|
relocate("org.bstats", "us.ajg0702.bstats")
|
||||||
archiveFileName.set("${baseName}-${version}.${extension}")
|
archiveFileName.set("${baseName}-${version}.${extension}")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
publications {
|
||||||
|
create<MavenPublication>("maven") {
|
||||||
|
groupId = project.group.toString();
|
||||||
|
artifactId = project.name
|
||||||
|
version = project.version.toString()
|
||||||
|
|
||||||
|
from(components["java"])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -450,6 +450,9 @@ public class Manager {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the ideal server in a server group.
|
* 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) {
|
public ServerInfo getIdealServer(QueueServer s, ProxiedPlayer p) {
|
||||||
HashMap<ServerInfo, ServerPing> serverInfos = s.getLastPings();
|
HashMap<ServerInfo, ServerPing> serverInfos = s.getLastPings();
|
||||||
@@ -629,7 +632,7 @@ public class Manager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(p.getServer().getInfo().getName().equals(s)) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -640,7 +643,7 @@ public class Manager {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(!pl.config.getBoolean("allow-multiple-queues")) {
|
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) {
|
for(QueueServer ser : beforeQueues) {
|
||||||
ser.getQueue().remove(p);
|
ser.getQueue().remove(p);
|
||||||
}
|
}
|
||||||
@@ -662,18 +665,24 @@ public class Manager {
|
|||||||
Logic.priorityLogic(server.getQueue(), s, p);
|
Logic.priorityLogic(server.getQueue(), s, p);
|
||||||
} else {
|
} else {
|
||||||
if((p.hasPermission("ajqueue.priority") || p.hasPermission("ajqueue.serverpriority."+s)) && list.size() > 0) {
|
if((p.hasPermission("ajqueue.priority") || p.hasPermission("ajqueue.serverpriority."+s)) && list.size() > 0) {
|
||||||
|
//p.sendMessage(Main.formatMessage("in priority"));
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for(ProxiedPlayer ply : list) {
|
for(ProxiedPlayer ply : list) {
|
||||||
if(!(ply.hasPermission("ajqueue.priority") || ply.hasPermission("ajqueue.serverpriority."+s))) {
|
if(!(ply.hasPermission("ajqueue.priority") || ply.hasPermission("ajqueue.serverpriority."+s))) {
|
||||||
|
//p.sendMessage(Main.formatMessage("Adding beind: "+i));
|
||||||
list.add(i, p);
|
list.add(i, p);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
//p.sendMessage(Main.formatMessage("after loop"));
|
||||||
if(list.size() == 0) {
|
if(list.size() == 0) {
|
||||||
list.add(p);
|
list.add(p);
|
||||||
|
} else if(!list.contains(p)) {
|
||||||
|
list.add(p);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
//p.sendMessage(Main.formatMessage("normal add"));
|
||||||
list.add(p);
|
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.
|
* <br>Since version 2.9.1 can you use OfflinePlayers in your requests.
|
||||||
*
|
*
|
||||||
* @param player
|
* @param player
|
||||||
* A {@link org.bukkit.PkPlayer Player}.
|
* A org.bukkit.PkPlayer Player.
|
||||||
* @param identifier
|
* @param identifier
|
||||||
* A String containing the identifier/value.
|
* A String containing the identifier/value.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
name: ajQueue
|
name: ajQueue
|
||||||
version: ${project.version}
|
version: "@VERSION@"
|
||||||
main: us.ajg0702.queue.Main
|
main: us.ajg0702.queue.Main
|
||||||
author: ajgeiss0702
|
author: ajgeiss0702
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
main: us.ajg0702.queue.spigot.Main
|
main: us.ajg0702.queue.spigot.Main
|
||||||
version: ${project.version}
|
version: "@VERSION@"
|
||||||
api-version: 1.13
|
api-version: 1.13
|
||||||
author: ajgeiss0702
|
author: ajgeiss0702
|
||||||
name: ajQueue
|
name: ajQueue
|
||||||
|
|||||||
Reference in New Issue
Block a user