mirror of
https://gitlab.com/phoenix-dvpmt/mmocore.git
synced 2025-01-06 07:07:38 +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);
|
Bukkit.getPluginManager().callEvent(event);
|
||||||
|
|
||||||
if (event.isCancelled()){
|
if (event.isCancelled()){
|
||||||
|
skillCasting.close();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.skillCasting = skillCasting;
|
this.skillCasting = skillCasting;
|
||||||
|
@ -96,6 +96,9 @@ public class KeyCombos implements SkillCastingListener {
|
|||||||
if (comboMap.isComboStart(event.getPressed())) {
|
if (comboMap.isComboStart(event.getPressed())) {
|
||||||
casting = new CustomSkillCastingInstance(playerData);
|
casting = new CustomSkillCastingInstance(playerData);
|
||||||
playerData.setSkillCasting(casting);
|
playerData.setSkillCasting(casting);
|
||||||
|
if (!playerData.isCasting()){
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (beginComboSound != null) beginComboSound.playTo(player);
|
if (beginComboSound != null) beginComboSound.playTo(player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -57,6 +57,9 @@ public class SkillBar implements SkillCastingListener {
|
|||||||
final PlayerData playerData = event.getData();
|
final PlayerData playerData = event.getData();
|
||||||
if (player.getGameMode() != GameMode.SPECTATOR && (MMOCore.plugin.configManager.canCreativeCast || player.getGameMode() != GameMode.CREATIVE) && !playerData.isCasting() && !playerData.getBoundSkills().isEmpty()) {
|
if (player.getGameMode() != GameMode.SPECTATOR && (MMOCore.plugin.configManager.canCreativeCast || player.getGameMode() != GameMode.CREATIVE) && !playerData.isCasting() && !playerData.getBoundSkills().isEmpty()) {
|
||||||
playerData.setSkillCasting(new CustomSkillCastingInstance(playerData));
|
playerData.setSkillCasting(new CustomSkillCastingInstance(playerData));
|
||||||
|
if (!playerData.isCasting()){
|
||||||
|
return;
|
||||||
|
}
|
||||||
MMOCore.plugin.soundManager.getSound(SoundEvent.SPELL_CAST_BEGIN).playTo(player);
|
MMOCore.plugin.soundManager.getSound(SoundEvent.SPELL_CAST_BEGIN).playTo(player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -78,6 +78,9 @@ public class SkillScroller implements SkillCastingListener {
|
|||||||
|
|
||||||
// Enter casting mode
|
// Enter casting mode
|
||||||
playerData.setSkillCasting(new CustomSkillCastingInstance(playerData));
|
playerData.setSkillCasting(new CustomSkillCastingInstance(playerData));
|
||||||
|
if (!playerData.isCasting()){
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (enterSound != null) enterSound.playTo(player);
|
if (enterSound != null) enterSound.playTo(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user