mirror of
https://gitlab.com/phoenix-dvpmt/mmocore.git
synced 2024-11-27 00:45:40 +01:00
.
This commit is contained in:
parent
72f14547d9
commit
9af5c358dd
@ -12,6 +12,7 @@ import net.Indyuce.mmocore.api.event.PlayerKeyPressEvent;
|
||||
import net.Indyuce.mmocore.api.player.PlayerData;
|
||||
import net.Indyuce.mmocore.gui.api.item.Placeholders;
|
||||
import net.Indyuce.mmocore.skill.cast.*;
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
@ -70,6 +71,8 @@ public class KeyCombos implements SkillCastingListener {
|
||||
public void whenPressingKey(PlayerKeyPressEvent event) {
|
||||
PlayerData playerData = event.getData();
|
||||
Player player = playerData.getPlayer();
|
||||
if(player.getGameMode()== GameMode.CREATIVE&&!MMOCore.plugin.configManager.canCreativeCast)
|
||||
return;
|
||||
|
||||
// Start combo when there is an initializer key
|
||||
if (!event.getData().isCasting() && initializerKey != null) {
|
||||
|
@ -4,6 +4,7 @@ import io.lumine.mythic.lib.UtilityMethods;
|
||||
import io.lumine.mythic.lib.api.player.EquipmentSlot;
|
||||
import io.lumine.mythic.lib.player.PlayerMetadata;
|
||||
import io.lumine.mythic.lib.skill.trigger.TriggerMetadata;
|
||||
import net.Indyuce.mmocore.MMOCore;
|
||||
import net.Indyuce.mmocore.api.SoundObject;
|
||||
import net.Indyuce.mmocore.api.event.PlayerKeyPressEvent;
|
||||
import net.Indyuce.mmocore.api.player.PlayerData;
|
||||
@ -11,6 +12,7 @@ import net.Indyuce.mmocore.skill.cast.PlayerKey;
|
||||
import net.Indyuce.mmocore.skill.cast.SkillCastingInstance;
|
||||
import net.Indyuce.mmocore.skill.cast.SkillCastingListener;
|
||||
import net.Indyuce.mmocore.skill.cast.SkillCastingMode;
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
@ -56,7 +58,8 @@ public class SkillScroller implements SkillCastingListener {
|
||||
public void whenPressingKey(PlayerKeyPressEvent event) {
|
||||
PlayerData playerData = event.getData();
|
||||
Player player = playerData.getPlayer();
|
||||
|
||||
if (player.getGameMode() == GameMode.CREATIVE && !MMOCore.plugin.configManager.canCreativeCast)
|
||||
return;
|
||||
if (event.getPressed() == enterKey) {
|
||||
|
||||
// Leave casting mode
|
||||
|
Loading…
Reference in New Issue
Block a user