mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-21 18:15:32 +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,7 +1760,11 @@ public class BukkitQuester implements Quester {
|
||||
if (!settings.canShowCompletedObjs() && objective.getProgress() >= objective.getGoal()) {
|
||||
continue;
|
||||
}
|
||||
quester.sendMessage(message);
|
||||
if (obj.getType().equals(ObjectiveType.CUSTOM)) {
|
||||
quester.sendMessage(message.trim().replaceAll("\\s{2,}", ""));
|
||||
} else {
|
||||
quester.sendMessage(message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user