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:
parent
83b5401fba
commit
b1efceccd3
@ -441,12 +441,16 @@ public class PlayerManager {
|
|||||||
if (levelUpEvent.isCancelled())
|
if (levelUpEvent.isCancelled())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (Jobs.getGCManager().SoundLevelupUse) {
|
// If it fails, we can ignore it
|
||||||
Sound sound = levelUpEvent.getSound();
|
try {
|
||||||
if (sound != null && player != null && player.getLocation() != null)
|
if (Jobs.getGCManager().SoundLevelupUse) {
|
||||||
player.getWorld().playSound(player.getLocation(), sound, levelUpEvent.getSoundVolume(), levelUpEvent.getSoundPitch());
|
Sound sound = levelUpEvent.getSound();
|
||||||
else
|
if (sound != null && player != null && player.getLocation() != null)
|
||||||
Bukkit.getConsoleSender().sendMessage("[Jobs] Cant find sound by name: " + levelUpEvent.getTitleChangeSound().name() + ". Please update it");
|
player.getWorld().playSound(player.getLocation(), sound, levelUpEvent.getSoundVolume(), levelUpEvent.getSoundPitch());
|
||||||
|
else
|
||||||
|
Bukkit.getConsoleSender().sendMessage("[Jobs] Cant find sound by name: " + levelUpEvent.getTitleChangeSound().name() + ". Please update it");
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
}
|
}
|
||||||
|
|
||||||
String message;
|
String message;
|
||||||
@ -481,13 +485,17 @@ public class PlayerManager {
|
|||||||
|
|
||||||
if (levelUpEvent.getNewTitle() != null && !levelUpEvent.getNewTitle().equals(levelUpEvent.getOldTitle())) {
|
if (levelUpEvent.getNewTitle() != null && !levelUpEvent.getNewTitle().equals(levelUpEvent.getOldTitle())) {
|
||||||
|
|
||||||
if (Jobs.getGCManager().SoundTitleChangeUse) {
|
// If it fails, we can ignore it
|
||||||
Sound sound = levelUpEvent.getTitleChangeSound();
|
try {
|
||||||
if (sound != null && player != null && player.getLocation() != null)
|
if (Jobs.getGCManager().SoundTitleChangeUse) {
|
||||||
player.getWorld().playSound(player.getLocation(), sound, levelUpEvent.getTitleChangeVolume(),
|
Sound sound = levelUpEvent.getTitleChangeSound();
|
||||||
levelUpEvent.getTitleChangePitch());
|
if (sound != null && player != null && player.getLocation() != null)
|
||||||
else
|
player.getWorld().playSound(player.getLocation(), sound, levelUpEvent.getTitleChangeVolume(),
|
||||||
Bukkit.getConsoleSender().sendMessage("[Jobs] Cant find sound by name: " + levelUpEvent.getTitleChangeSound().name() + ". Please update it");
|
levelUpEvent.getTitleChangePitch());
|
||||||
|
else
|
||||||
|
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()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user