1
0
mirror of https://github.com/Zrips/Jobs.git synced 2025-01-04 23:37:49 +01:00

Lets recognize quests with multiple words

This commit is contained in:
Zrips 2020-08-25 17:21:33 +03:00
parent dc85541107
commit 9b068c306c
3 changed files with 11 additions and 5 deletions

View File

@ -14,6 +14,7 @@ import com.gamingmesh.jobs.container.JobsPlayer;
import com.gamingmesh.jobs.container.Quest;
import com.gamingmesh.jobs.container.QuestProgression;
import com.gamingmesh.jobs.economy.BufferedEconomy;
import com.gamingmesh.jobs.stuff.Debug;
public class skipquest implements Cmd {
@ -27,7 +28,7 @@ public class skipquest implements Cmd {
JobsPlayer jPlayer = null;
Job job = null;
String questName = null;
String questName = "";
for (String one : args) {
if (job == null) {
@ -41,7 +42,9 @@ public class skipquest implements Cmd {
continue;
}
questName = one;
if (!questName.isEmpty())
questName += " ";
questName += one;
}
if (jPlayer == null && sender instanceof Player)
@ -65,7 +68,7 @@ public class skipquest implements Cmd {
Quest old = null;
for (QuestProgression one : quests) {
if (one.getQuest().getConfigName().equalsIgnoreCase(questName)) {
if (one.getQuest().getQuestName().equalsIgnoreCase(questName) || one.getQuest().getConfigName().equalsIgnoreCase(questName)) {
old = one.getQuest();
break;
}
@ -82,8 +85,9 @@ public class skipquest implements Cmd {
}
}
if (Jobs.getGCManager().getDailyQuestsSkips() <= jPlayer.getSkippedQuests())
if (Jobs.getGCManager().getDailyQuestsSkips() <= jPlayer.getSkippedQuests()) {
return false;
}
double amount = Jobs.getGCManager().skipQuestCost;
BufferedEconomy econ = Jobs.getEconomy();

View File

@ -95,7 +95,8 @@ public class ConfigManager {
cfg.addComment(pt + ".FullDescription", "Full description of job to be shown in job browse command");
cfg.get(pt + ".FullDescription", Arrays.asList("&2Get money for:", " &7Planting trees", " &7Cutting down trees", " &7Killing players"));
cfg.addComment(pt + ".ChatColour", "The colour of the name, for a full list of supported colours, go to the message config.");
cfg.addComment(pt + ".ChatColour",
"The colour of the name, for a full list of supported colours, go to the message config. Hex color codes are supported as of 1.16 minecraft version. Example: {#6600cc} or {#Brown}");
cfg.get(pt + ".ChatColour", "GREEN");
cfg.addComment(pt + ".BossBarColour", "[OPTIONAL] The colour of the boss bar: GREEN, BLUE, RED, WHITE, YELLOW, PINK, PURPLE.");

View File

@ -38,6 +38,7 @@ import com.gamingmesh.jobs.Signs.SignTopType;
import com.gamingmesh.jobs.dao.JobsDAO;
import com.gamingmesh.jobs.economy.PaymentData;
import com.gamingmesh.jobs.resources.jfep.Parser;
import com.gamingmesh.jobs.stuff.Debug;
import com.gamingmesh.jobs.stuff.FurnaceBrewingHandling;
import com.gamingmesh.jobs.stuff.TimeManage;