diff --git a/src/main/java/com/gamingmesh/jobs/Jobs.java b/src/main/java/com/gamingmesh/jobs/Jobs.java index 5f9d7111..2322e6dd 100644 --- a/src/main/java/com/gamingmesh/jobs/Jobs.java +++ b/src/main/java/com/gamingmesh/jobs/Jobs.java @@ -477,7 +477,7 @@ public class Jobs extends JavaPlugin { for (Job job : jobs) { if (job.getName().equalsIgnoreCase(jobName)) return job; - if (job.getJobKeyName().equalsIgnoreCase(jobName)) + if (job.getJobFullName().equalsIgnoreCase(jobName)) return job; } return null; diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/editquests.java b/src/main/java/com/gamingmesh/jobs/commands/list/editquests.java index 2842f972..d7d50779 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/editquests.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/editquests.java @@ -217,7 +217,7 @@ public class editquests implements Cmd { } org.bukkit.configuration.file.YamlConfiguration file = Jobs.getConfigManager().getJobConfig(); - String j = "Jobs." + job.getJobKeyName() + ".Quests." + q.getConfigName() + "."; + String j = "Jobs." + job.getName() + ".Quests." + q.getConfigName() + "."; if (file.isString(j + "Target")) { Jobs.getConfigManager().changeJobsSettings(args[1], file.getString(j + "Target"), target); @@ -556,7 +556,7 @@ public class editquests implements Cmd { player.performCommand("jobs editquests list " + job.getName() + " " + actionT.getName() + " " + q.getConfigName() + " 1"); org.bukkit.configuration.file.YamlConfiguration file = Jobs.getConfigManager().getJobConfig(); - String j = "Jobs." + job.getJobKeyName() + ".Quests." + q.getConfigName() + "."; + String j = "Jobs." + job.getName() + ".Quests." + q.getConfigName() + "."; if (file.isString(j + "Target")) { Jobs.getConfigManager().changeJobsSettings(args[1], file.getString(j + "Target"), (type + subType).toLowerCase()); diff --git a/src/main/java/com/gamingmesh/jobs/container/Job.java b/src/main/java/com/gamingmesh/jobs/container/Job.java index 94b12082..420e568c 100644 --- a/src/main/java/com/gamingmesh/jobs/container/Job.java +++ b/src/main/java/com/gamingmesh/jobs/container/Job.java @@ -333,7 +333,7 @@ public class Job { * @return the full job name */ public String getName() { - return fullName; + return jobName; } /** @@ -347,15 +347,6 @@ public class Job { return jobColour + fullName; } - /** - * Returns the job name retrieved from the config - * - * @return the job key name from config section - */ - public String getJobKeyName() { - return jobName; - } - /** * Get the shortened version of the jobName * @@ -684,6 +675,10 @@ public class Job { return obj instanceof Job && isSame((Job) obj); } + public String getJobFullName() { + return fullName; + } + public String getJobDisplayName() { return jobDisplayName == null ? jobColour + fullName : jobDisplayName; }