New quest titles, add config option. Bump version number

This commit is contained in:
HappyPikachu 2017-08-02 23:41:29 -04:00
parent e819917af1
commit 7f9eb50252
8 changed files with 17 additions and 1 deletions

Binary file not shown.

Binary file not shown.

View File

@ -3,7 +3,7 @@
<groupId>me.blackvein.quests</groupId>
<artifactId>quests</artifactId>
<version>2.9.8</version>
<version>2.9.9</version>
<name>quests</name>
<url>https://github.com/FlyingPikachu/Quests/</url>
<packaging>jar</packaging>

View File

@ -339,6 +339,12 @@ public class Quest {
complete = complete.replaceAll("<quest>", ChatColor.YELLOW + name + ChatColor.GOLD);
player.sendMessage(ChatColor.GOLD + complete);
player.sendMessage(ChatColor.GREEN + Lang.get("questRewardsTitle"));
if (plugin.showQuestTitles) {
Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), "title " + player.getName()
+ " title " + "{\"text\":\"" + Lang.get("quest") + " " + Lang.get("complete") + "\",\"color\":\"gold\"}");
Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), "title " + player.getName()
+ " subtitle " + "{\"text\":\"" + name + "\",\"color\":\"yellow\"}");
}
if (questPoints > 0) {
player.sendMessage("- " + ChatColor.DARK_GREEN + questPoints + " " + Lang.get("questPoints"));
q.questPoints += questPoints;

View File

@ -312,6 +312,12 @@ public class Quester {
accepted = accepted.replaceAll("<quest>", q.name);
player.sendMessage(ChatColor.GREEN + accepted);
player.sendMessage("");
if (plugin.showQuestTitles) {
Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), "title " + player.getName()
+ " title " + "{\"text\":\"" + Lang.get("quest") + " " + Lang.get("accepted") + "\",\"color\":\"gold\"}");
Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), "title " + player.getName()
+ " subtitle " + "{\"text\":\"" + q.name + "\",\"color\":\"yellow\"}");
}
}
String msg = Lang.get("questObjectivesTitle");
msg = msg.replaceAll("<quest>", q.name);

View File

@ -124,6 +124,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener
public boolean allowCommands = true;
public boolean allowCommandsForNpcQuests = false;
public boolean showQuestReqs = true;
public boolean showQuestTitles = true;
public boolean allowQuitting = true;
public boolean convertData = false;
public boolean load = false;
@ -408,6 +409,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener
allowCommands = config.getBoolean("allow-command-questing", true);
allowCommandsForNpcQuests = config.getBoolean("allow-command-quests-with-npcs", false);
showQuestReqs = config.getBoolean("show-requirements", true);
showQuestTitles = config.getBoolean("show-titles", true);
allowQuitting = config.getBoolean("allow-quitting", true);
useCompass = config.getBoolean("use-compass", true);
genFilesOnJoin = config.getBoolean("generate-files-on-join", true);

View File

@ -935,6 +935,7 @@ public class Lang {
langMap.put("createdBy", "Created by");
langMap.put("continuedBy", "and continued by");
langMap.put("questPoints", "Quest Points");
langMap.put("accepted", "Accepted");
langMap.put("complete", "Complete");
langMap.put("redoable", "Redoable");
langMap.put("usage", "Usage");

View File

@ -2,6 +2,7 @@ language: "en"
allow-command-questing: true
allow-command-quests-with-npcs: false
show-requirements: true
show-titles: true
allow-quitting: true
use-compass: true
ignore-locked-quests: false