mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-29 05:55:27 +01:00
Temporary level down message
More options will be added later
This commit is contained in:
parent
5daae998f0
commit
c2cefe784a
@ -529,6 +529,36 @@ public class PlayerManager {
|
||||
if (prog == null)
|
||||
return;
|
||||
|
||||
// when the player loses income
|
||||
if (prog.getLevel() < oldLevel) {
|
||||
String message = Jobs.getLanguage().getMessage("message.leveldown.message");
|
||||
|
||||
message = message.replace("%jobname%", job.getChatColor() + job.getName());
|
||||
|
||||
if (player != null)
|
||||
message = message.replace("%playername%", player.getDisplayName());
|
||||
else
|
||||
message = message.replace("%playername%", jPlayer.getUserName());
|
||||
|
||||
message = message.replace("%joblevel%", "" + prog.getLevel());
|
||||
|
||||
if (player != null) {
|
||||
for (String line : message.split("\n")) {
|
||||
if (Jobs.getGCManager().LevelChangeActionBar)
|
||||
Jobs.getActionBar().send(player, line);
|
||||
if (Jobs.getGCManager().LevelChangeChat)
|
||||
player.sendMessage(line);
|
||||
}
|
||||
}
|
||||
|
||||
jPlayer.reloadHonorific();
|
||||
Jobs.getPermissionHandler().recalculatePermissions(jPlayer);
|
||||
performCommandOnLevelUp(jPlayer, prog.getJob(), oldLevel);
|
||||
Jobs.getSignUtil().SignUpdate(job.getName());
|
||||
Jobs.getSignUtil().SignUpdate("gtoplist");
|
||||
return;
|
||||
}
|
||||
|
||||
// LevelUp event
|
||||
JobsLevelUpEvent levelUpEvent = new JobsLevelUpEvent(
|
||||
jPlayer,
|
||||
|
@ -634,6 +634,7 @@ public class LanguageManager {
|
||||
|
||||
c.get("message.levelup.broadcast", "%playername% is now a level %joblevel% %jobname%.");
|
||||
c.get("message.levelup.nobroadcast", "You are now level %joblevel% %jobname%.");
|
||||
c.get("message.leveldown.message", "&cYou lost leve in&e %jobname%&c job! Level:&6 %joblevel%&c.");
|
||||
|
||||
c.get("message.cowtimer", "&eYou still need to wait &6%time% &esec to get paid for this job.");
|
||||
c.get("message.blocktimer", "&eYou need to wait &3[time] &esec more to get paid for this!");
|
||||
|
@ -603,6 +603,8 @@ message:
|
||||
levelup:
|
||||
broadcast: '%playername% %joblevel% szintet lépett a(z) %jobname% munkában.'
|
||||
nobroadcast: '&aSzintet léptél a(z) %jobname% &amunkában! Szint:&6 %joblevel%&a.'
|
||||
leveldown:
|
||||
message: '&cSzintet estél a(z)&e %jobname%&c munkában! Szint:&6 %joblevel%&c.'
|
||||
cowtimer: '&eMég várnod kell &6%time% &emásodpercet, hogy fizesse ezt a munkát.'
|
||||
blocktimer: '&eKérlek, várj &3[time] &emásodpercet, hogy újra küldjön pénzt!'
|
||||
placeblocktimer: '&eNem lehet gyorsabban lerakni blokkokat &6[time] &esec intervallumot ugyanazon a helyen!'
|
||||
|
Loading…
Reference in New Issue
Block a user