mirror of
https://github.com/Zrips/Jobs.git
synced 2025-01-02 14:29:07 +01:00
Player display name support for locale files by using
%playerdisplayname% variable
This commit is contained in:
parent
f70027708e
commit
b48eb48ea9
@ -658,7 +658,8 @@ public class PlayerManager {
|
|||||||
String message = Jobs.getLanguage().getMessage("message.leveldown.message");
|
String message = Jobs.getLanguage().getMessage("message.leveldown.message");
|
||||||
|
|
||||||
message = message.replace("%jobname%", job.getDisplayName());
|
message = message.replace("%jobname%", job.getDisplayName());
|
||||||
message = message.replace("%playername%", player != null ? plugin.getComplement().getDisplayName(player) : jPlayer.getName());
|
message = message.replace("%playername%", jPlayer.getName());
|
||||||
|
message = message.replace("%playerdisplayname%", jPlayer.getDisplayName());
|
||||||
message = message.replace("%joblevel%", prog.getLevelFormatted());
|
message = message.replace("%joblevel%", prog.getLevelFormatted());
|
||||||
message = message.replace("%lostLevel%", Integer.toString(oldLevel));
|
message = message.replace("%lostLevel%", Integer.toString(oldLevel));
|
||||||
|
|
||||||
@ -766,7 +767,8 @@ public class PlayerManager {
|
|||||||
message = message.replace("%titlename%", levelUpEvent.getOldTitle()
|
message = message.replace("%titlename%", levelUpEvent.getOldTitle()
|
||||||
.getChatColor().toString() + levelUpEvent.getOldTitle().getName());
|
.getChatColor().toString() + levelUpEvent.getOldTitle().getName());
|
||||||
|
|
||||||
message = message.replace("%playername%", player != null ? plugin.getComplement().getDisplayName(player) : jPlayer.getName());
|
message = message.replace("%playername%", jPlayer.getName());
|
||||||
|
message = message.replace("%playerdisplayname%", jPlayer.getDisplayName());
|
||||||
message = message.replace("%joblevel%", prog.getLevelFormatted());
|
message = message.replace("%joblevel%", prog.getLevelFormatted());
|
||||||
|
|
||||||
if (Jobs.getGCManager().isBroadcastingLevelups() || Jobs.getGCManager().LevelChangeActionBar || Jobs.getGCManager().LevelChangeChat) {
|
if (Jobs.getGCManager().isBroadcastingLevelups() || Jobs.getGCManager().LevelChangeActionBar || Jobs.getGCManager().LevelChangeChat) {
|
||||||
@ -798,7 +800,8 @@ public class PlayerManager {
|
|||||||
message = Jobs.getLanguage().getMessage("message.skillup." + (Jobs.getGCManager().isBroadcastingSkillups()
|
message = Jobs.getLanguage().getMessage("message.skillup." + (Jobs.getGCManager().isBroadcastingSkillups()
|
||||||
? "broadcast" : "nobroadcast"));
|
? "broadcast" : "nobroadcast"));
|
||||||
|
|
||||||
message = message.replace("%playername%", player != null ? plugin.getComplement().getDisplayName(player) : jPlayer.getName());
|
message = message.replace("%playername%", jPlayer.getName());
|
||||||
|
message = message.replace("%playerdisplayname%", jPlayer.getDisplayName());
|
||||||
message = message.replace("%titlename%", levelUpEvent.getNewTitle()
|
message = message.replace("%titlename%", levelUpEvent.getNewTitle()
|
||||||
.getChatColor().toString() + levelUpEvent.getNewTitle().getName());
|
.getChatColor().toString() + levelUpEvent.getNewTitle().getName());
|
||||||
message = message.replace("%jobname%", job.getDisplayName());
|
message = message.replace("%jobname%", job.getDisplayName());
|
||||||
|
@ -40,7 +40,7 @@ public class archive implements Cmd {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
sender.sendMessage(Jobs.getLanguage().getMessage("general.info.toplineseparator", "%playername%", jPlayer.getName()));
|
sender.sendMessage(Jobs.getLanguage().getMessage("general.info.toplineseparator", "%playername%", jPlayer.getName(), "%playerdisplayname%", jPlayer.getDisplayName()));
|
||||||
for (JobProgression jobInfo : allJobs) {
|
for (JobProgression jobInfo : allJobs) {
|
||||||
RawMessage rm = new RawMessage();
|
RawMessage rm = new RawMessage();
|
||||||
if (jobInfo.canRejoin())
|
if (jobInfo.canRejoin())
|
||||||
|
@ -35,6 +35,7 @@ public class editpoints implements Cmd {
|
|||||||
pointInfo.takePoints(amount);
|
pointInfo.takePoints(amount);
|
||||||
sender.sendMessage(Jobs.getLanguage().getMessage("command.editpoints.output.take",
|
sender.sendMessage(Jobs.getLanguage().getMessage("command.editpoints.output.take",
|
||||||
"%playername%", jPlayer.getName(),
|
"%playername%", jPlayer.getName(),
|
||||||
|
"%playerdisplayname%", jPlayer.getDisplayName(),
|
||||||
"%amount%", amount,
|
"%amount%", amount,
|
||||||
"%total%", (int) (pointInfo.getCurrentPoints() * 100) / 100D));
|
"%total%", (int) (pointInfo.getCurrentPoints() * 100) / 100D));
|
||||||
break;
|
break;
|
||||||
@ -42,6 +43,7 @@ public class editpoints implements Cmd {
|
|||||||
pointInfo.addPoints(amount);
|
pointInfo.addPoints(amount);
|
||||||
sender.sendMessage(Jobs.getLanguage().getMessage("command.editpoints.output.add",
|
sender.sendMessage(Jobs.getLanguage().getMessage("command.editpoints.output.add",
|
||||||
"%playername%", jPlayer.getName(),
|
"%playername%", jPlayer.getName(),
|
||||||
|
"%playerdisplayname%", jPlayer.getDisplayName(),
|
||||||
"%amount%", amount,
|
"%amount%", amount,
|
||||||
"%total%", (int) (pointInfo.getCurrentPoints() * 100) / 100D));
|
"%total%", (int) (pointInfo.getCurrentPoints() * 100) / 100D));
|
||||||
break;
|
break;
|
||||||
@ -49,6 +51,7 @@ public class editpoints implements Cmd {
|
|||||||
pointInfo.setPoints(amount);
|
pointInfo.setPoints(amount);
|
||||||
sender.sendMessage(Jobs.getLanguage().getMessage("command.editpoints.output.set",
|
sender.sendMessage(Jobs.getLanguage().getMessage("command.editpoints.output.set",
|
||||||
"%playername%", jPlayer.getName(),
|
"%playername%", jPlayer.getName(),
|
||||||
|
"%playerdisplayname%", jPlayer.getDisplayName(),
|
||||||
"%amount%", amount));
|
"%amount%", amount));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -67,6 +67,7 @@ public class gtop implements Cmd {
|
|||||||
sender.sendMessage(Jobs.getLanguage().getMessage("command.gtop.output.list",
|
sender.sendMessage(Jobs.getLanguage().getMessage("command.gtop.output.list",
|
||||||
"%number%", pi.getPositionForOutput(i),
|
"%number%", pi.getPositionForOutput(i),
|
||||||
"%playername%", One.getPlayerInfo().getName(),
|
"%playername%", One.getPlayerInfo().getName(),
|
||||||
|
"%playerdisplayname%", One.getPlayerInfo().getDisplayName(),
|
||||||
"%level%", One.getLevel(),
|
"%level%", One.getLevel(),
|
||||||
"%exp%", One.getExp()));
|
"%exp%", One.getExp()));
|
||||||
++i;
|
++i;
|
||||||
@ -81,6 +82,7 @@ public class gtop implements Cmd {
|
|||||||
ls.add(Jobs.getLanguage().getMessage("scoreboard.line",
|
ls.add(Jobs.getLanguage().getMessage("scoreboard.line",
|
||||||
"%number%", pi.getPositionForOutput(i),
|
"%number%", pi.getPositionForOutput(i),
|
||||||
"%playername%", one.getPlayerInfo().getName(),
|
"%playername%", one.getPlayerInfo().getName(),
|
||||||
|
"%playerdisplayname%", one.getPlayerInfo().getDisplayName(),
|
||||||
"%level%", one.getLevel()));
|
"%level%", one.getLevel()));
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
|
@ -71,7 +71,7 @@ public class log implements Cmd {
|
|||||||
int count = 0;
|
int count = 0;
|
||||||
int max = 10;
|
int max = 10;
|
||||||
|
|
||||||
sender.sendMessage(Jobs.getLanguage().getMessage("command.log.output.topline", "%playername%", JPlayer.getName()));
|
sender.sendMessage(Jobs.getLanguage().getMessage("command.log.output.topline", "%playername%", JPlayer.getName(), "%playerdisplayname%", JPlayer.getDisplayName()));
|
||||||
for (Log one : logList.values()) {
|
for (Log one : logList.values()) {
|
||||||
double totalMoney = 0, totalExp = 0, totalPoints = 0;
|
double totalMoney = 0, totalExp = 0, totalPoints = 0;
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ public class points implements Cmd {
|
|||||||
|
|
||||||
PlayerPoints pointInfo = jPlayer.getPointsData();
|
PlayerPoints pointInfo = jPlayer.getPointsData();
|
||||||
|
|
||||||
sender.sendMessage(Jobs.getLanguage().getMessage("general.info.toplineseparator", "%playername%", jPlayer.getName()));
|
sender.sendMessage(Jobs.getLanguage().getMessage("general.info.toplineseparator", "%playername%", jPlayer.getName(), "%playerdisplayname%", jPlayer.getDisplayName()));
|
||||||
sender.sendMessage(Jobs.getLanguage().getMessage("command.points.currentpoints", "%currentpoints%", (int) (pointInfo.getCurrentPoints() * 100) / 100D));
|
sender.sendMessage(Jobs.getLanguage().getMessage("command.points.currentpoints", "%currentpoints%", (int) (pointInfo.getCurrentPoints() * 100) / 100D));
|
||||||
sender.sendMessage(Jobs.getLanguage().getMessage("command.points.totalpoints", "%totalpoints%", (int) (pointInfo.getTotalPoints() * 100) / 100D));
|
sender.sendMessage(Jobs.getLanguage().getMessage("command.points.totalpoints", "%totalpoints%", (int) (pointInfo.getTotalPoints() * 100) / 100D));
|
||||||
sender.sendMessage(Jobs.getLanguage().getMessage("general.info.separator"));
|
sender.sendMessage(Jobs.getLanguage().getMessage("general.info.separator"));
|
||||||
|
@ -33,7 +33,7 @@ public class resetlimit implements Cmd {
|
|||||||
}
|
}
|
||||||
|
|
||||||
jPlayer.resetPaymentLimit();
|
jPlayer.resetPaymentLimit();
|
||||||
sender.sendMessage(Jobs.getLanguage().getMessage("command.resetlimit.output.reseted", "%playername%", jPlayer.getName()));
|
sender.sendMessage(Jobs.getLanguage().getMessage("command.resetlimit.output.reseted", "%playername%", jPlayer.getName(), "%playerdisplayname%", jPlayer.getDisplayName()));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,7 @@ public class resetquest implements Cmd {
|
|||||||
}
|
}
|
||||||
|
|
||||||
jPlayer.resetQuests(quests);
|
jPlayer.resetQuests(quests);
|
||||||
sender.sendMessage(Jobs.getLanguage().getMessage("command.resetquest.output.reseted", "%playername%", jPlayer.getName()));
|
sender.sendMessage(Jobs.getLanguage().getMessage("command.resetquest.output.reseted", "%playername%", jPlayer.getName(), "%playerdisplayname%", jPlayer.getName()));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@ public class resetquesttotal implements Cmd {
|
|||||||
jPlayer.setDoneQuests(0);
|
jPlayer.setDoneQuests(0);
|
||||||
jPlayer.setSaved(false);
|
jPlayer.setSaved(false);
|
||||||
jPlayer.save();
|
jPlayer.save();
|
||||||
sender.sendMessage(Jobs.getLanguage().getMessage("command.resetquesttotal.output.reseted", "%playername%", jPlayer.getName()));
|
sender.sendMessage(Jobs.getLanguage().getMessage("command.resetquesttotal.output.reseted", "%playername%", jPlayer.getName(), "%playerdisplayname%", jPlayer.getDisplayName()));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,6 @@ public class stats implements Cmd {
|
|||||||
if (args.length >= 1) {
|
if (args.length >= 1) {
|
||||||
if (!Jobs.hasPermission(sender, "jobs.command.admin.stats", true))
|
if (!Jobs.hasPermission(sender, "jobs.command.admin.stats", true))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
jPlayer = Jobs.getPlayerManager().getJobsPlayer(args[0]);
|
jPlayer = Jobs.getPlayerManager().getJobsPlayer(args[0]);
|
||||||
} else if (sender instanceof Player)
|
} else if (sender instanceof Player)
|
||||||
jPlayer = Jobs.getPlayerManager().getJobsPlayer((Player) sender);
|
jPlayer = Jobs.getPlayerManager().getJobsPlayer((Player) sender);
|
||||||
@ -38,7 +37,7 @@ public class stats implements Cmd {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
sender.sendMessage(Jobs.getLanguage().getMessage("general.info.toplineseparator", "%playername%", jPlayer.getName()));
|
sender.sendMessage(Jobs.getLanguage().getMessage("general.info.toplineseparator", "%playername%", jPlayer.getName(), "%playerdisplayname%", jPlayer.getDisplayName()));
|
||||||
|
|
||||||
String leftClick = Jobs.getLanguage().getMessage("command.info.gui.leftClick");
|
String leftClick = Jobs.getLanguage().getMessage("command.info.gui.leftClick");
|
||||||
|
|
||||||
|
@ -56,8 +56,8 @@ public class top implements Cmd {
|
|||||||
int workingIn = Jobs.getUsedSlots(job);
|
int workingIn = Jobs.getUsedSlots(job);
|
||||||
PageInfo pi = new PageInfo(Jobs.getGCManager().JobsTopAmount, workingIn, page);
|
PageInfo pi = new PageInfo(Jobs.getGCManager().JobsTopAmount, workingIn, page);
|
||||||
|
|
||||||
List<TopList> FullList = Jobs.getJobsDAO().toplist(job.getName(), pi.getStart());
|
List<TopList> fullList = Jobs.getJobsDAO().toplist(job.getName(), pi.getStart());
|
||||||
if (FullList.isEmpty()) {
|
if (fullList.isEmpty()) {
|
||||||
player.sendMessage(Jobs.getLanguage().getMessage("general.error.noinfo"));
|
player.sendMessage(Jobs.getLanguage().getMessage("general.error.noinfo"));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -68,26 +68,27 @@ public class top implements Cmd {
|
|||||||
|
|
||||||
if (!Jobs.getGCManager().ShowToplistInScoreboard) {
|
if (!Jobs.getGCManager().ShowToplistInScoreboard) {
|
||||||
player.sendMessage(Jobs.getLanguage().getMessage("command.top.output.topline", "%jobname%", job.getName(), "%amount%", Jobs.getGCManager().JobsTopAmount));
|
player.sendMessage(Jobs.getLanguage().getMessage("command.top.output.topline", "%jobname%", job.getName(), "%amount%", Jobs.getGCManager().JobsTopAmount));
|
||||||
for (TopList One : FullList) {
|
for (TopList one : fullList) {
|
||||||
if (place > Jobs.getGCManager().JobsTopAmount)
|
if (place > Jobs.getGCManager().JobsTopAmount)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
player.sendMessage(Jobs.getLanguage().getMessage("command.top.output.list",
|
player.sendMessage(Jobs.getLanguage().getMessage("command.top.output.list",
|
||||||
"%number%", ((page - 1) * Jobs.getGCManager().JobsTopAmount) + place,
|
"%number%", ((page - 1) * Jobs.getGCManager().JobsTopAmount) + place,
|
||||||
"%playername%", One.getPlayerInfo().getName(),
|
"%playername%", one.getPlayerInfo().getName(),
|
||||||
"%level%", One.getLevel(),
|
"%playerdisplayname%", one.getPlayerInfo().getDisplayName(),
|
||||||
"%exp%", One.getExp()));
|
"%level%", one.getLevel(),
|
||||||
|
"%exp%", one.getExp()));
|
||||||
place++;
|
place++;
|
||||||
}
|
}
|
||||||
plugin.showPagination(sender, pi, "jobs top " + job.getName());
|
plugin.showPagination(sender, pi, "jobs top " + job.getName());
|
||||||
} else {
|
} else {
|
||||||
List<String> ls = new ArrayList<>();
|
List<String> ls = new ArrayList<>();
|
||||||
|
|
||||||
for (TopList one : FullList) {
|
for (TopList one : fullList) {
|
||||||
if (place > Jobs.getGCManager().JobsTopAmount)
|
if (place > Jobs.getGCManager().JobsTopAmount)
|
||||||
break;
|
break;
|
||||||
ls.add(Jobs.getLanguage().getMessage("scoreboard.line", "%number%", ((page - 1) * Jobs.getGCManager().JobsTopAmount) + place,
|
ls.add(Jobs.getLanguage().getMessage("scoreboard.line", "%number%", ((page - 1) * Jobs.getGCManager().JobsTopAmount) + place,
|
||||||
"%playername%", one.getPlayerInfo().getName(), "%level%", one.getLevel()));
|
"%playername%", one.getPlayerInfo().getName(), "%playerdisplayname%", one.getPlayerInfo().getDisplayName(), "%level%", one.getLevel()));
|
||||||
place++;
|
place++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,9 +72,12 @@ public class LanguageManager {
|
|||||||
|
|
||||||
Jobs.getGCManager().getCommandArgs().clear();
|
Jobs.getGCManager().getCommandArgs().clear();
|
||||||
|
|
||||||
|
c.addHeaderComments(new ArrayList<String>(Arrays.asList(
|
||||||
|
"%playername% or %playerdisplayname% can be used to include ether players original name or his display name which can be colored and use players nick name")));
|
||||||
|
|
||||||
c.get("economy.error.nomoney", "&cSorry, no money left in national bank!");
|
c.get("economy.error.nomoney", "&cSorry, no money left in national bank!");
|
||||||
c.get("limitedItem.error.levelup", "&cYou need to level up in [jobname] to use this item!");
|
c.get("limitedItem.error.levelup", "&cYou need to level up in [jobname] to use this item!");
|
||||||
c.get("general.info.toplineseparator", "&7*********************** &6%playername% &7***********************");
|
c.get("general.info.toplineseparator", "&7*********************** &6%playerdisplayname% &7***********************");
|
||||||
c.get("general.info.separator", "&7*******************************************************");
|
c.get("general.info.separator", "&7*******************************************************");
|
||||||
c.get("general.info.time.days", "&e%days% &6days ");
|
c.get("general.info.time.days", "&e%days% &6days ");
|
||||||
c.get("general.info.time.hours", "&e%hours% &6hours ");
|
c.get("general.info.time.hours", "&e%hours% &6hours ");
|
||||||
@ -95,6 +98,7 @@ public class LanguageManager {
|
|||||||
c.get("general.error.noCommand", "&cThere is no command by this name!");
|
c.get("general.error.noCommand", "&cThere is no command by this name!");
|
||||||
c.get("general.error.permission", "&cYou do not have permission to do that!");
|
c.get("general.error.permission", "&cYou do not have permission to do that!");
|
||||||
c.get("general.error.noinfo", "&cNo information found!");
|
c.get("general.error.noinfo", "&cNo information found!");
|
||||||
|
c.addComment("general.error.noinfoByPlayer", "Only %playername% can be used here");
|
||||||
c.get("general.error.noinfoByPlayer", "&cNo information found by [%playername%] player name!");
|
c.get("general.error.noinfoByPlayer", "&cNo information found by [%playername%] player name!");
|
||||||
c.get("general.error.ingame", "&cYou can use this command only in game!");
|
c.get("general.error.ingame", "&cYou can use this command only in game!");
|
||||||
c.get("general.error.fromconsole", "&cYou can use this command only from console!");
|
c.get("general.error.fromconsole", "&cYou can use this command only from console!");
|
||||||
@ -211,27 +215,27 @@ public class LanguageManager {
|
|||||||
c.get("command.limit.output.reachedpointslimit2", "&eYou can check your limit with &2/jobs limit &ecommand");
|
c.get("command.limit.output.reachedpointslimit2", "&eYou can check your limit with &2/jobs limit &ecommand");
|
||||||
c.get("command.limit.output.notenabled", "&eMoney limit is not enabled");
|
c.get("command.limit.output.notenabled", "&eMoney limit is not enabled");
|
||||||
|
|
||||||
c.get("command.resetexploreregion.help.info", "Resets region data of Explorering");
|
c.get("command.resetexploreregion.help.info", "Resets region data of Explorering");
|
||||||
c.get("command.resetexploreregion.help.args", "world [worldname]");
|
c.get("command.resetexploreregion.help.args", "world [worldname]");
|
||||||
Jobs.getGCManager().getCommandArgs().put("resetlimit", Arrays.asList("world", "[worldname]"));
|
Jobs.getGCManager().getCommandArgs().put("resetlimit", Arrays.asList("world", "[worldname]"));
|
||||||
c.get("command.resetexploreregion.output.notenabled", "&eNot enabled.");
|
c.get("command.resetexploreregion.output.notenabled", "&eNot enabled.");
|
||||||
c.get("command.resetexploreregion.output.invalidname", "&eInvalid world name");
|
c.get("command.resetexploreregion.output.invalidname", "&eInvalid world name");
|
||||||
c.get("command.resetexploreregion.output.reseted", "&eExploring region data has been reset for: &2%worldname%");
|
c.get("command.resetexploreregion.output.reseted", "&eExploring region data has been reset for: &2%worldname%");
|
||||||
|
|
||||||
c.get("command.resetlimit.help.info", "Resets a player's payment limits");
|
c.get("command.resetlimit.help.info", "Resets a player's payment limits");
|
||||||
c.get("command.resetlimit.help.args", "[playername]");
|
c.get("command.resetlimit.help.args", "[playername]");
|
||||||
Jobs.getGCManager().getCommandArgs().put("resetlimit", Arrays.asList("[playername]"));
|
Jobs.getGCManager().getCommandArgs().put("resetlimit", Arrays.asList("[playername]"));
|
||||||
c.get("command.resetlimit.output.reseted", "&ePayment limits have been reset for: &2%playername%");
|
c.get("command.resetlimit.output.reseted", "&ePayment limits have been reset for: &2%playerdisplayname%");
|
||||||
|
|
||||||
c.get("command.resetquesttotal.help.info", "Resets a player's done quest counter");
|
c.get("command.resetquesttotal.help.info", "Resets a player's done quest counter");
|
||||||
c.get("command.resetquesttotal.help.args", "[playername]/all");
|
c.get("command.resetquesttotal.help.args", "[playername]/all");
|
||||||
Jobs.getGCManager().getCommandArgs().put("resetquesttotal", Arrays.asList("[playername]%%all"));
|
Jobs.getGCManager().getCommandArgs().put("resetquesttotal", Arrays.asList("[playername]%%all"));
|
||||||
c.get("command.resetquesttotal.output.reseted", "&eDone quests have been reset for: &2%playername%");
|
c.get("command.resetquesttotal.output.reseted", "&eDone quests have been reset for: &2%playerdisplayname%");
|
||||||
|
|
||||||
c.get("command.resetquest.help.info", "Resets a player's quest");
|
c.get("command.resetquest.help.info", "Resets a player's quest");
|
||||||
c.get("command.resetquest.help.args", "[playername] [jobname]");
|
c.get("command.resetquest.help.args", "[playername] [jobname]");
|
||||||
Jobs.getGCManager().getCommandArgs().put("resetquest", Arrays.asList("[playername]", "[jobname]"));
|
Jobs.getGCManager().getCommandArgs().put("resetquest", Arrays.asList("[playername]", "[jobname]"));
|
||||||
c.get("command.resetquest.output.reseted", "&eQuest has been reset for: &2%playername%");
|
c.get("command.resetquest.output.reseted", "&eQuest has been reset for: &2%playerdisplayname%");
|
||||||
c.get("command.resetquest.output.noQuests", "&eCan't find any quests");
|
c.get("command.resetquest.output.noQuests", "&eCan't find any quests");
|
||||||
|
|
||||||
c.get("command.points.help.info", "Shows how much points does a player have.");
|
c.get("command.points.help.info", "Shows how much points does a player have.");
|
||||||
@ -243,9 +247,9 @@ public class LanguageManager {
|
|||||||
c.get("command.editpoints.help.info", "Edit player's points.");
|
c.get("command.editpoints.help.info", "Edit player's points.");
|
||||||
c.get("command.editpoints.help.args", "set/add/take [playername] [amount]");
|
c.get("command.editpoints.help.args", "set/add/take [playername] [amount]");
|
||||||
Jobs.getGCManager().getCommandArgs().put("editpoints", Arrays.asList("set%%add%%take", "[playername]"));
|
Jobs.getGCManager().getCommandArgs().put("editpoints", Arrays.asList("set%%add%%take", "[playername]"));
|
||||||
c.get("command.editpoints.output.set", "&ePlayers (&6%playername%&e) points was set to &6%amount%");
|
c.get("command.editpoints.output.set", "&ePlayers (&6%playerdisplayname%&e) points was set to &6%amount%");
|
||||||
c.get("command.editpoints.output.add", "&ePlayer (&6%playername%&e) got additional &6%amount% &epoints. Now they have &6%total%");
|
c.get("command.editpoints.output.add", "&ePlayer (&6%playerdisplayname%&e) got additional &6%amount% &epoints. Now they have &6%total%");
|
||||||
c.get("command.editpoints.output.take", "&ePlayer (&6%playername%&e) lost &6%amount% &epoints. Now they have &6%total%");
|
c.get("command.editpoints.output.take", "&ePlayer (&6%playerdisplayname%&e) lost &6%amount% &epoints. Now they have &6%total%");
|
||||||
|
|
||||||
c.get("command.editjobs.help.info", "Edit current jobs.");
|
c.get("command.editjobs.help.info", "Edit current jobs.");
|
||||||
c.get("command.editjobs.help.args", "");
|
c.get("command.editjobs.help.args", "");
|
||||||
@ -343,7 +347,7 @@ public class LanguageManager {
|
|||||||
|
|
||||||
c.get("command.give.help.info", "Gives item by jobs name and item category name. Player name is optional");
|
c.get("command.give.help.info", "Gives item by jobs name and item category name. Player name is optional");
|
||||||
c.get("command.give.help.args", "[playername] [jobname] [items/limiteditems] [jobitemname]");
|
c.get("command.give.help.args", "[playername] [jobname] [items/limiteditems] [jobitemname]");
|
||||||
Jobs.getGCManager().getCommandArgs().put("give", Arrays.asList("[playername]", "[jobname]", "items%%limiteditems","[jobitemname]"));
|
Jobs.getGCManager().getCommandArgs().put("give", Arrays.asList("[playername]", "[jobname]", "items%%limiteditems", "[jobitemname]"));
|
||||||
c.get("command.give.output.notonline", "&4Player with that name is not online!");
|
c.get("command.give.output.notonline", "&4Player with that name is not online!");
|
||||||
c.get("command.give.output.noitem", "&4Can't find any item by given name!");
|
c.get("command.give.output.noitem", "&4Can't find any item by given name!");
|
||||||
|
|
||||||
@ -484,7 +488,7 @@ public class LanguageManager {
|
|||||||
c.get("command.browse.output.jobHeader", "&2========== [jobname] =========");
|
c.get("command.browse.output.jobHeader", "&2========== [jobname] =========");
|
||||||
c.get("command.browse.output.chooseJob", "&7&n&oChoose this job");
|
c.get("command.browse.output.chooseJob", "&7&n&oChoose this job");
|
||||||
c.get("command.browse.output.chooseJobHover", "&7Click here to get this job");
|
c.get("command.browse.output.chooseJobHover", "&7Click here to get this job");
|
||||||
|
|
||||||
c.get("command.ownedblocks.help.info", "Check block ownership");
|
c.get("command.ownedblocks.help.info", "Check block ownership");
|
||||||
c.get("command.ownedblocks.help.args", "[playername]");
|
c.get("command.ownedblocks.help.args", "[playername]");
|
||||||
Jobs.getGCManager().getCommandArgs().put("ownedblocks", Arrays.asList("[playername]"));
|
Jobs.getGCManager().getCommandArgs().put("ownedblocks", Arrays.asList("[playername]"));
|
||||||
@ -542,18 +546,14 @@ public class LanguageManager {
|
|||||||
Jobs.getGCManager().getCommandArgs().put("top", Arrays.asList("[jobname]"));
|
Jobs.getGCManager().getCommandArgs().put("top", Arrays.asList("[jobname]"));
|
||||||
c.get("command.top.error.nojob", "Can't find any job with this name.");
|
c.get("command.top.error.nojob", "Can't find any job with this name.");
|
||||||
c.get("command.top.output.topline", "&aTop&e %amount% &aplayers by &e%jobname% &ajob");
|
c.get("command.top.output.topline", "&aTop&e %amount% &aplayers by &e%jobname% &ajob");
|
||||||
c.get("command.top.output.list", "&e%number%&a. &e%playername% &alvl &e%level% &awith&e %exp% &aexp");
|
c.get("command.top.output.list", "&e%number%&a. &e%playerdisplayname% &alvl &e%level% &awith&e %exp% &aexp");
|
||||||
c.get("command.top.output.prev", "&e<<<<< Prev page &2|");
|
|
||||||
c.get("command.top.output.next", "&2|&e Next Page >>>>");
|
|
||||||
c.get("command.top.output.show", "&2Show from &e[from] &2until &e[until] &2top list");
|
c.get("command.top.output.show", "&2Show from &e[from] &2until &e[until] &2top list");
|
||||||
|
|
||||||
c.get("command.gtop.help.info", "Shows top players by global jobs level.");
|
c.get("command.gtop.help.info", "Shows top players by global jobs level.");
|
||||||
c.get("command.gtop.help.args", "clear/pageNumber");
|
c.get("command.gtop.help.args", "clear/pageNumber");
|
||||||
c.get("command.gtop.error.nojob", "Can't find any information.");
|
c.get("command.gtop.error.nojob", "Can't find any information.");
|
||||||
c.get("command.gtop.output.topline", "&aTop&e %amount% &aplayers by global job level");
|
c.get("command.gtop.output.topline", "&aTop&e %amount% &aplayers by global job level");
|
||||||
c.get("command.gtop.output.list", "&e%number%&a. &e%playername% &alvl &e%level% &awith&e %exp% &aexp");
|
c.get("command.gtop.output.list", "&e%number%&a. &e%playerdisplayname% &alvl &e%level% &awith&e %exp% &aexp");
|
||||||
c.get("command.gtop.output.prev", "&e<<<<< Prev page &2|");
|
|
||||||
c.get("command.gtop.output.next", "&2|&e Next Page >>>>");
|
|
||||||
c.get("command.gtop.output.show", "&2Show from &e[from] &2until &e[until] &2global top list");
|
c.get("command.gtop.output.show", "&2Show from &e[from] &2until &e[until] &2global top list");
|
||||||
|
|
||||||
c.get("command.area.help.info", "Modify restricted areas.");
|
c.get("command.area.help.info", "Modify restricted areas.");
|
||||||
@ -578,7 +578,7 @@ public class LanguageManager {
|
|||||||
c.get("command.log.help.info", "Shows statistics.");
|
c.get("command.log.help.info", "Shows statistics.");
|
||||||
c.get("command.log.help.args", "[playername]");
|
c.get("command.log.help.args", "[playername]");
|
||||||
Jobs.getGCManager().getCommandArgs().put("log", Arrays.asList("[playername]"));
|
Jobs.getGCManager().getCommandArgs().put("log", Arrays.asList("[playername]"));
|
||||||
c.get("command.log.output.topline", "&7************************* &6%playername% &7*************************");
|
c.get("command.log.output.topline", "&7************************* &6%playerdisplayname% &7*************************");
|
||||||
c.get("command.log.output.ls", "&7* &6%number%. &3%action%: &6%item% &eqty: %qty% %money%%exp%%points%");
|
c.get("command.log.output.ls", "&7* &6%number%. &3%action%: &6%item% &eqty: %qty% %money%%exp%%points%");
|
||||||
c.get("command.log.output.money", "&6money: %amount% ");
|
c.get("command.log.output.money", "&6money: %amount% ");
|
||||||
c.get("command.log.output.exp", "&eexp: %amount% ");
|
c.get("command.log.output.exp", "&eexp: %amount% ");
|
||||||
@ -669,12 +669,11 @@ public class LanguageManager {
|
|||||||
c.get("command.version.output.newVault", "&eVault: &6[version] ");
|
c.get("command.version.output.newVault", "&eVault: &6[version] ");
|
||||||
c.get("command.version.output.CMILib", "&eCMILib: &6[version] ");
|
c.get("command.version.output.CMILib", "&eCMILib: &6[version] ");
|
||||||
c.get("command.version.output.cmilVersionNew", "&e-> [newVersion]");
|
c.get("command.version.output.cmilVersionNew", "&e-> [newVersion]");
|
||||||
|
|
||||||
|
c.get("message.skillup.broadcast", "%playerdisplayname% has been promoted to a %titlename% %jobname%.");
|
||||||
c.get("message.skillup.broadcast", "%playername% has been promoted to a %titlename% %jobname%.");
|
|
||||||
c.get("message.skillup.nobroadcast", "Congratulations, you have been promoted to a %titlename% %jobname%.");
|
c.get("message.skillup.nobroadcast", "Congratulations, you have been promoted to a %titlename% %jobname%.");
|
||||||
|
|
||||||
c.get("message.levelup.broadcast", "%playername% is now a level %joblevel% %jobname%.");
|
c.get("message.levelup.broadcast", "%playerdisplayname% is now a level %joblevel% %jobname%.");
|
||||||
c.get("message.levelup.nobroadcast", "You are now level %joblevel% %jobname%.");
|
c.get("message.levelup.nobroadcast", "You are now level %joblevel% %jobname%.");
|
||||||
c.get("message.leveldown.message", "&cYou lost level&e %lostLevel%&c in&e %jobname%&c job! Level:&6 %joblevel%&c.");
|
c.get("message.leveldown.message", "&cYou lost level&e %lostLevel%&c in&e %jobname%&c job! Level:&6 %joblevel%&c.");
|
||||||
|
|
||||||
@ -719,7 +718,7 @@ public class LanguageManager {
|
|||||||
//c.get("scoreboard.clear", "&eIf you want to remove scoreboard, type &2/jobs top clear");
|
//c.get("scoreboard.clear", "&eIf you want to remove scoreboard, type &2/jobs top clear");
|
||||||
c.get("scoreboard.topline", "&2Top &e%jobname%");
|
c.get("scoreboard.topline", "&2Top &e%jobname%");
|
||||||
c.get("scoreboard.gtopline", "&2Global top list");
|
c.get("scoreboard.gtopline", "&2Global top list");
|
||||||
c.get("scoreboard.line", "&2%number%. &e%playername% (&6%level%&e)");
|
c.get("scoreboard.line", "&2%number%. &e%playerdisplayname% &e(&6%level%&e)");
|
||||||
|
|
||||||
signKeys.clear();
|
signKeys.clear();
|
||||||
signKeys.addAll(c.getC().getConfigurationSection("signs.secondline").getKeys(false));
|
signKeys.addAll(c.getC().getConfigurationSection("signs.secondline").getKeys(false));
|
||||||
|
@ -488,6 +488,17 @@ public class JobsPlayer {
|
|||||||
return userName;
|
return userName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getDisplayName() {
|
||||||
|
if (!this.isOnline())
|
||||||
|
return getName();
|
||||||
|
Player p = this.getPlayer();
|
||||||
|
|
||||||
|
if (p == null)
|
||||||
|
return getName();
|
||||||
|
|
||||||
|
return p.getDisplayName() == null || p.getDisplayName().isEmpty() ? getName() : p.getDisplayName();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get the playerUUID
|
* get the playerUUID
|
||||||
* @return the playerUUID
|
* @return the playerUUID
|
||||||
|
@ -54,6 +54,16 @@ public class PlayerInfo {
|
|||||||
return player;
|
return player;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getDisplayName() {
|
||||||
|
if (player == null)
|
||||||
|
player = Jobs.getPlayerManager().getJobsPlayer(uuid);
|
||||||
|
|
||||||
|
if (player == null)
|
||||||
|
return getName();
|
||||||
|
|
||||||
|
return player.getDisplayName();
|
||||||
|
}
|
||||||
|
|
||||||
public Integer getQuestsDone() {
|
public Integer getQuestsDone() {
|
||||||
return questsDone;
|
return questsDone;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user