1
0
mirror of https://github.com/Zrips/Jobs.git synced 2025-01-02 14:29:07 +01:00

Just in case

This commit is contained in:
Zrips 2017-01-13 16:57:03 +02:00
parent 83b5401fba
commit b1efceccd3

View File

@ -441,6 +441,8 @@ public class PlayerManager {
if (levelUpEvent.isCancelled())
return;
// If it fails, we can ignore it
try {
if (Jobs.getGCManager().SoundLevelupUse) {
Sound sound = levelUpEvent.getSound();
if (sound != null && player != null && player.getLocation() != null)
@ -448,6 +450,8 @@ public class PlayerManager {
else
Bukkit.getConsoleSender().sendMessage("[Jobs] Cant find sound by name: " + levelUpEvent.getTitleChangeSound().name() + ". Please update it");
}
} catch (Exception e) {
}
String message;
if (Jobs.getGCManager().isBroadcastingLevelups()) {
@ -481,6 +485,8 @@ public class PlayerManager {
if (levelUpEvent.getNewTitle() != null && !levelUpEvent.getNewTitle().equals(levelUpEvent.getOldTitle())) {
// If it fails, we can ignore it
try {
if (Jobs.getGCManager().SoundTitleChangeUse) {
Sound sound = levelUpEvent.getTitleChangeSound();
if (sound != null && player != null && player.getLocation() != null)
@ -489,6 +495,8 @@ public class PlayerManager {
else
Bukkit.getConsoleSender().sendMessage("[Jobs] Cant find sound by name: " + levelUpEvent.getTitleChangeSound().name() + ". Please update it");
}
} catch (Exception e) {
}
// user would skill up
if (Jobs.getGCManager().isBroadcastingSkillups()) {
message = Jobs.getLanguage().getMessage("message.skillup.broadcast");