mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-25 03:55:35 +01:00
Clear extra space from custom objective display
This commit is contained in:
parent
3e59fc5659
commit
3f2465fe6c
@ -78,7 +78,7 @@ public class BukkitQuestJournal {
|
||||
continue;
|
||||
}
|
||||
final String message = "- " + BukkitLang.BukkitFormatToken.convertString(player,
|
||||
objective.getMessage());
|
||||
objective.getMessage().trim().replaceAll("\\s{2,}", ""));
|
||||
if (!plugin.getConfigSettings().canShowCompletedObjs()
|
||||
&& message.startsWith(ChatColor.GRAY.toString())) {
|
||||
continue;
|
||||
|
@ -1668,7 +1668,7 @@ public class BukkitQuester implements Quester {
|
||||
if (co.canShowCount()) {
|
||||
message = message.replace("%count%", cleared + "/" + toClear);
|
||||
}
|
||||
message = BukkitConfigUtil.parseString(message);
|
||||
message = BukkitConfigUtil.parseString(message.trim().replaceAll("\\s{2,}", ""));
|
||||
objectives.add(new BukkitObjective(ObjectiveType.CUSTOM, message, cleared, toClear));
|
||||
customIndex++;
|
||||
}
|
||||
@ -1760,10 +1760,14 @@ public class BukkitQuester implements Quester {
|
||||
if (!settings.canShowCompletedObjs() && objective.getProgress() >= objective.getGoal()) {
|
||||
continue;
|
||||
}
|
||||
if (obj.getType().equals(ObjectiveType.CUSTOM)) {
|
||||
quester.sendMessage(message.trim().replaceAll("\\s{2,}", ""));
|
||||
} else {
|
||||
quester.sendMessage(message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if player's current stage has the specified objective
|
||||
|
Loading…
Reference in New Issue
Block a user