mirror of
https://github.com/Zrips/Jobs.git
synced 2025-01-20 07:01:22 +01:00
Just in case
This commit is contained in:
parent
83b5401fba
commit
b1efceccd3
@ -441,6 +441,8 @@ public class PlayerManager {
|
|||||||
if (levelUpEvent.isCancelled())
|
if (levelUpEvent.isCancelled())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// If it fails, we can ignore it
|
||||||
|
try {
|
||||||
if (Jobs.getGCManager().SoundLevelupUse) {
|
if (Jobs.getGCManager().SoundLevelupUse) {
|
||||||
Sound sound = levelUpEvent.getSound();
|
Sound sound = levelUpEvent.getSound();
|
||||||
if (sound != null && player != null && player.getLocation() != null)
|
if (sound != null && player != null && player.getLocation() != null)
|
||||||
@ -448,6 +450,8 @@ public class PlayerManager {
|
|||||||
else
|
else
|
||||||
Bukkit.getConsoleSender().sendMessage("[Jobs] Cant find sound by name: " + levelUpEvent.getTitleChangeSound().name() + ". Please update it");
|
Bukkit.getConsoleSender().sendMessage("[Jobs] Cant find sound by name: " + levelUpEvent.getTitleChangeSound().name() + ". Please update it");
|
||||||
}
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
}
|
||||||
|
|
||||||
String message;
|
String message;
|
||||||
if (Jobs.getGCManager().isBroadcastingLevelups()) {
|
if (Jobs.getGCManager().isBroadcastingLevelups()) {
|
||||||
@ -481,6 +485,8 @@ public class PlayerManager {
|
|||||||
|
|
||||||
if (levelUpEvent.getNewTitle() != null && !levelUpEvent.getNewTitle().equals(levelUpEvent.getOldTitle())) {
|
if (levelUpEvent.getNewTitle() != null && !levelUpEvent.getNewTitle().equals(levelUpEvent.getOldTitle())) {
|
||||||
|
|
||||||
|
// If it fails, we can ignore it
|
||||||
|
try {
|
||||||
if (Jobs.getGCManager().SoundTitleChangeUse) {
|
if (Jobs.getGCManager().SoundTitleChangeUse) {
|
||||||
Sound sound = levelUpEvent.getTitleChangeSound();
|
Sound sound = levelUpEvent.getTitleChangeSound();
|
||||||
if (sound != null && player != null && player.getLocation() != null)
|
if (sound != null && player != null && player.getLocation() != null)
|
||||||
@ -489,6 +495,8 @@ public class PlayerManager {
|
|||||||
else
|
else
|
||||||
Bukkit.getConsoleSender().sendMessage("[Jobs] Cant find sound by name: " + levelUpEvent.getTitleChangeSound().name() + ". Please update it");
|
Bukkit.getConsoleSender().sendMessage("[Jobs] Cant find sound by name: " + levelUpEvent.getTitleChangeSound().name() + ". Please update it");
|
||||||
}
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
}
|
||||||
// user would skill up
|
// user would skill up
|
||||||
if (Jobs.getGCManager().isBroadcastingSkillups()) {
|
if (Jobs.getGCManager().isBroadcastingSkillups()) {
|
||||||
message = Jobs.getLanguage().getMessage("message.skillup.broadcast");
|
message = Jobs.getLanguage().getMessage("message.skillup.broadcast");
|
||||||
|
Loading…
Reference in New Issue
Block a user