mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-25 03:55:35 +01:00
Use ascending order for the Quest Journal. Bump version number
This commit is contained in:
parent
209a874a61
commit
baf0cdbf56
2
dist/pom.xml
vendored
2
dist/pom.xml
vendored
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>me.blackvein.quests</groupId>
|
||||
<artifactId>quests-parent</artifactId>
|
||||
<version>3.8.6</version>
|
||||
<version>3.8.7</version>
|
||||
</parent>
|
||||
<artifactId>quests-dist</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>me.blackvein.quests</groupId>
|
||||
<artifactId>quests-parent</artifactId>
|
||||
<version>3.8.6</version>
|
||||
<version>3.8.7</version>
|
||||
</parent>
|
||||
<artifactId>quests-main</artifactId>
|
||||
|
||||
|
@ -16,6 +16,7 @@ import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.LinkedList;
|
||||
@ -27,6 +28,7 @@ import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.DyeColor;
|
||||
@ -359,7 +361,10 @@ public class Quester {
|
||||
int currentLength = 0;
|
||||
int currentLines = 0;
|
||||
String page = "";
|
||||
for (Quest quest : currentQuests.keySet()) {
|
||||
List<Quest> sortedList = currentQuests.keySet().stream()
|
||||
.sorted(Comparator.comparing(Quest::getName))
|
||||
.collect(Collectors.toList());
|
||||
for (Quest quest : sortedList) {
|
||||
if ((currentLength + quest.getName().length() > 240) || (currentLines
|
||||
+ ((quest.getName().length() % 19) == 0 ? (quest.getName().length() / 19)
|
||||
: ((quest.getName().length() / 19) + 1))) > 13) {
|
||||
@ -373,8 +378,8 @@ public class Quester {
|
||||
currentLength += quest.getName().length();
|
||||
currentLines += (quest.getName().length() / 19);
|
||||
}
|
||||
if (getObjectives(quest, false) != null) {
|
||||
for (String obj : getObjectives(quest, false)) {
|
||||
if (getCurrentObjectives(quest, false) != null) {
|
||||
for (String obj : getCurrentObjectives(quest, false)) {
|
||||
// Length/Line check
|
||||
if ((currentLength + obj.length() > 240) || (currentLines + ((obj.length() % 19)
|
||||
== 0 ? (obj.length() / 19) : ((obj.length() / 19) + 1))) > 13) {
|
||||
|
4
pom.xml
4
pom.xml
@ -6,12 +6,12 @@
|
||||
<groupId>me.blackvein.quests</groupId>
|
||||
|
||||
<artifactId>quests-parent</artifactId>
|
||||
<version>3.8.6</version>
|
||||
<version>3.8.7</version>
|
||||
<name>quests</name>
|
||||
<url>https://github.com/PikaMug/Quests/</url>
|
||||
|
||||
<properties>
|
||||
<revision>3.8.6</revision>
|
||||
<revision>3.8.7</revision>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>me.blackvein.quests</groupId>
|
||||
<artifactId>quests-parent</artifactId>
|
||||
<version>3.8.6</version>
|
||||
<version>3.8.7</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>me.blackvein.quests</groupId>
|
||||
<artifactId>quests-parent</artifactId>
|
||||
<version>3.8.6</version>
|
||||
<version>3.8.7</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>me.blackvein.quests</groupId>
|
||||
<artifactId>quests-parent</artifactId>
|
||||
<version>3.8.6</version>
|
||||
<version>3.8.7</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
Loading…
Reference in New Issue
Block a user