Skip to content

Commit

Permalink
misc: 一些调整
Browse files Browse the repository at this point in the history
  • Loading branch information
MATRIX-feather committed Oct 12, 2023
1 parent 14d8cb1 commit f8a98a6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/xiamomc/morph/skills/MorphSkillHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import xiamomc.morph.events.api.lifecycle.SkillsFinishedInitializeEvent;
import xiamomc.morph.messages.CommandStrings;
import xiamomc.morph.messages.MessageUtils;
import xiamomc.morph.messages.MorphStrings;
import xiamomc.morph.messages.SkillStrings;
import xiamomc.morph.misc.permissions.CommonPermissions;
import xiamomc.morph.skills.impl.*;
Expand Down Expand Up @@ -209,9 +210,11 @@ public void executeDisguiseSkill(Player player, boolean bypassPermission)
}

var event = new PlayerExecuteSkillEvent(player, state);
Bukkit.getPluginManager().callEvent(event);
event.callEvent();

if (event.isCancelled())
{
player.sendMessage(MessageUtils.prefixes(player, MorphStrings.operationCancelledString()));
state.setSkillCooldown(5);
return;
}
Expand Down

0 comments on commit f8a98a6

Please sign in to comment.