mirror of
https://gitlab.com/phoenix-dvpmt/mmocore.git
synced 2025-01-05 06:57:37 +01:00
Fix of small bugs relate to the events!
This commit is contained in:
parent
222fbfc833
commit
6088c8b343
@ -1009,6 +1009,7 @@ public class PlayerData extends SynchronizedDataHolder implements OfflinePlayerD
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
|
||||
if (event.isCancelled()){
|
||||
skillCasting.close();
|
||||
return;
|
||||
}
|
||||
this.skillCasting = skillCasting;
|
||||
|
@ -96,6 +96,9 @@ public class KeyCombos implements SkillCastingListener {
|
||||
if (comboMap.isComboStart(event.getPressed())) {
|
||||
casting = new CustomSkillCastingInstance(playerData);
|
||||
playerData.setSkillCasting(casting);
|
||||
if (!playerData.isCasting()){
|
||||
return;
|
||||
}
|
||||
if (beginComboSound != null) beginComboSound.playTo(player);
|
||||
}
|
||||
}
|
||||
|
@ -57,6 +57,9 @@ public class SkillBar implements SkillCastingListener {
|
||||
final PlayerData playerData = event.getData();
|
||||
if (player.getGameMode() != GameMode.SPECTATOR && (MMOCore.plugin.configManager.canCreativeCast || player.getGameMode() != GameMode.CREATIVE) && !playerData.isCasting() && !playerData.getBoundSkills().isEmpty()) {
|
||||
playerData.setSkillCasting(new CustomSkillCastingInstance(playerData));
|
||||
if (!playerData.isCasting()){
|
||||
return;
|
||||
}
|
||||
MMOCore.plugin.soundManager.getSound(SoundEvent.SPELL_CAST_BEGIN).playTo(player);
|
||||
}
|
||||
}
|
||||
|
@ -78,6 +78,9 @@ public class SkillScroller implements SkillCastingListener {
|
||||
|
||||
// Enter casting mode
|
||||
playerData.setSkillCasting(new CustomSkillCastingInstance(playerData));
|
||||
if (!playerData.isCasting()){
|
||||
return;
|
||||
}
|
||||
if (enterSound != null) enterSound.playTo(player);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user