mirror of
https://github.com/Zrips/Jobs.git
synced 2025-01-16 13:11:19 +01:00
[IMPROVE] Add -sa argument for skip admin success message
This commit is contained in:
parent
3fc3da0659
commit
bdc2f847cb
@ -100,6 +100,7 @@ public class exp implements Cmd {
|
|||||||
|
|
||||||
Player player = jPlayer.getPlayer();
|
Player player = jPlayer.getPlayer();
|
||||||
boolean isSilent = false;
|
boolean isSilent = false;
|
||||||
|
boolean isSilentAdmin = false;
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
for (String one : args) {
|
for (String one : args) {
|
||||||
if (one.equalsIgnoreCase("-s")) {
|
if (one.equalsIgnoreCase("-s")) {
|
||||||
@ -111,7 +112,15 @@ public class exp implements Cmd {
|
|||||||
player.sendMessage(Jobs.getLanguage().getMessage("command.exp.output.target", "%jobname%", job.getDisplayName(), "%level%", prog.getLevelFormatted(), "%exp%", prog
|
player.sendMessage(Jobs.getLanguage().getMessage("command.exp.output.target", "%jobname%", job.getDisplayName(), "%level%", prog.getLevelFormatted(), "%exp%", prog
|
||||||
.getExperience()));
|
.getExperience()));
|
||||||
}
|
}
|
||||||
|
for (String one : args) {
|
||||||
|
if (one.equalsIgnoreCase("-sa")) {
|
||||||
|
isSilentAdmin = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!isSilentAdmin) {
|
||||||
sender.sendMessage(Jobs.getLanguage().getMessage("general.admin.success"));
|
sender.sendMessage(Jobs.getLanguage().getMessage("general.admin.success"));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
sender.sendMessage(Jobs.getLanguage().getMessage("general.give.output.notonline"));
|
sender.sendMessage(Jobs.getLanguage().getMessage("general.give.output.notonline"));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user