1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-11-25 20:16:13 +01:00

Fixing jobs info feedback message

This commit is contained in:
Zrips 2021-11-26 13:39:17 +02:00
parent c0ab727817
commit 4c6c41bc52

View File

@ -257,7 +257,7 @@ public class JobsCommands implements CommandExecutor {
}
for (ActionType actionType : ActionType.values()) {
if (!type.isEmpty() && type.startsWith(actionType.getName().toLowerCase())) {
if (type.isEmpty() || type.startsWith(actionType.getName().toLowerCase())) {
List<JobInfo> info = job.getJobInfo(actionType);
if (info != null && !info.isEmpty()) {
String m = jobInfoMessage(player, job, actionType);
@ -265,11 +265,9 @@ public class JobsCommands implements CommandExecutor {
message.addAll(Arrays.asList(m.split("\n")));
else
message.add(m);
} else if (!type.isEmpty()) {
message.add(Jobs.getLanguage().getMessage("command.info.output." + actionType.getName().toLowerCase() + ".none", "%jobname%", job.getJobDisplayName()));
}
} else if (type.isEmpty()) {
String myMessage = Jobs.getLanguage().getMessage("command.info.output." + actionType.getName().toLowerCase() + ".none");
myMessage = myMessage.replace("%jobname%", job.getJobDisplayName());
message.add(myMessage);
}
}