1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-12-30 21:07:48 +01:00

Grab first sound if setup is failed

This commit is contained in:
Zrips 2017-01-13 16:55:09 +02:00
parent 2e68508b9b
commit 83b5401fba
3 changed files with 7 additions and 7 deletions

View File

@ -416,7 +416,6 @@ public class PlayerManager {
* @param job
* @param oldLevel
*/
@SuppressWarnings("deprecation")
public void performLevelUp(JobsPlayer jPlayer, Job job, int oldLevel) {
Player player = jPlayer.getPlayer();

View File

@ -92,7 +92,7 @@ public final class JobsLevelUpEvent extends Event implements Cancellable {
}
public Sound getSound() {
return this.soundLevelupSound;
return this.soundLevelupSound == null ? Sound.values()[0] : this.soundLevelupSound;
}
public void setSound(Sound sound) {
@ -121,7 +121,7 @@ public final class JobsLevelUpEvent extends Event implements Cancellable {
}
public Sound getTitleChangeSound() {
return this.soundTitleChangeSound;
return this.soundTitleChangeSound == null ? Sound.values()[0] : this.soundTitleChangeSound;
}
public void setTitleChangeSound(Sound sound) {

View File

@ -747,13 +747,14 @@ public class GeneralConfigManager {
"If you are not using breeding payment, you can disable this to save little resources. Really little.");
useBreederFinder = c.get("use-breeder-finder", true);
c.getW().addComment("boost", "[Removed]", "Money exp boost with special permision.",
c.getW().addComment("old-job", "------------------------------------------------------------------------", "[Section Removed] Now its all permission based", "Money exp boost with special permision.",
"You will need to add special permision for groups or players to have money/exp/points boost.",
"Use: jobs.boost.[jobname].money.[amount] or jobs.boost.[jobname].exp.[amount] or jobs.boost.[jobname].points.[amount] or jobs.boost.[jobname].all.[amount] for all of them with specific jobs name.",
"Use: jobs.boost.all.money.[amount] or jobs.boost.all.exp.[amount] or jobs.boost.all.points.[amount] or jobs.boost.all.all.[amount] to get boost for all jobs",
"In example: jobs.boost.miner.exp.0.25 means that player will get 25% more than others, you can set less than 1 to get less from anothers");
c.getW().addComment("old-job", "Old job save", "Players can leave job and return later with some level loss during that",
"In example: jobs.boost.miner.exp.0.25 means that player will get 25% more than others, you can set less than 0 to get less from anothers",
"jobs.boost.all.all.-0.5, jobs.boost.miner.all.1",
"------------------------------------------------------------------------",
"Old job save", "Players can leave job and return later with some level loss during that",
"You can fix players level if hes job level is at max level");
levelLossPercentage = c.get("old-job.level-loss-percentage", 30);
fixAtMaxLevel = c.get("old-job.fix-at-max-level", true);