mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-29 14:05:25 +01:00
Ok, job name is its identification, we HAVE to return jobs key name and
not full name which can be different
This commit is contained in:
parent
04b426c806
commit
7ba66de4fe
@ -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;
|
||||
|
@ -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());
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user