1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-11-26 12:35:28 +01:00

Lets allow to click on stats line to show information about job

This commit is contained in:
Zrips 2020-03-24 14:56:32 +02:00
parent a872100804
commit ac40c2e266

View File

@ -4,6 +4,7 @@ import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import com.gamingmesh.jobs.Jobs;
import com.gamingmesh.jobs.CMILib.RawMessage;
import com.gamingmesh.jobs.commands.Cmd;
import com.gamingmesh.jobs.commands.JobCommand;
import com.gamingmesh.jobs.container.JobProgression;
@ -38,8 +39,11 @@ public class stats implements Cmd {
sender.sendMessage(Jobs.getLanguage().getMessage("general.info.toplineseparator", "%playername%", jPlayer.getName()));
for (JobProgression jobProg : jPlayer.getJobProgression()) {
String[] msg = Jobs.getCommandManager().jobStatsMessage(jobProg).split("\n");
sender.sendMessage(msg);
for (String msg : Jobs.getCommandManager().jobStatsMessage(jobProg).split("\n")) {
RawMessage rm = new RawMessage();
rm.add(msg, Jobs.getLanguage().getMessage("command.info.gui.leftClick"), "jobs info " + jobProg.getJob().getName());
rm.show(sender);
}
}
sender.sendMessage(Jobs.getLanguage().getMessage("general.info.separator"));
return true;