Fixed an issue with 'Skill Scroller' casting mode

This commit is contained in:
Indyuce 2022-07-24 21:58:57 +02:00
parent a659468775
commit 55d1a3cf13

View File

@ -107,6 +107,9 @@ public class SkillScroller implements Listener {
CustomSkillCastingHandler casting = (CustomSkillCastingHandler) playerData.getSkillCasting(); CustomSkillCastingHandler casting = (CustomSkillCastingHandler) playerData.getSkillCasting();
casting.index = mod(casting.index + change, playerData.getBoundSkills().size()); casting.index = mod(casting.index + change, playerData.getBoundSkills().size());
casting.onTick(); casting.onTick();
if (changeSound != null)
changeSound.playTo(event.getPlayer());
} }
private int mod(int x, int n) { private int mod(int x, int n) {