forked from Upstream/mmocore
Cannot enter combos with no skills bound
This commit is contained in:
parent
2708dd2072
commit
1a976c6aa0
@ -73,6 +73,9 @@ public class KeyCombos implements SkillCastingListener {
|
|||||||
if (player.getGameMode() == GameMode.CREATIVE && !MMOCore.plugin.configManager.canCreativeCast)
|
if (player.getGameMode() == GameMode.CREATIVE && !MMOCore.plugin.configManager.canCreativeCast)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// Don't start combos if no skills are bound
|
||||||
|
if (playerData.getBoundSkills().isEmpty()) return;
|
||||||
|
|
||||||
// Start combo when there is an initializer key
|
// Start combo when there is an initializer key
|
||||||
if (!event.getData().isCasting() && initializerKey != null) {
|
if (!event.getData().isCasting() && initializerKey != null) {
|
||||||
if (event.getPressed() == initializerKey) {
|
if (event.getPressed() == initializerKey) {
|
||||||
@ -172,7 +175,8 @@ public class KeyCombos implements SkillCastingListener {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onTick() {
|
public void onTick() {
|
||||||
if (actionBarOptions != null) if (actionBarOptions.isSubtitle)
|
if (getCaster().getBoundSkills().isEmpty()) close();
|
||||||
|
else if (actionBarOptions != null) if (actionBarOptions.isSubtitle)
|
||||||
getCaster().getPlayer().sendTitle(" ", actionBarOptions.format(this), 0, 20, 0);
|
getCaster().getPlayer().sendTitle(" ", actionBarOptions.format(this), 0, 20, 0);
|
||||||
else getCaster().displayActionBar(actionBarOptions.format(this));
|
else getCaster().displayActionBar(actionBarOptions.format(this));
|
||||||
}
|
}
|
||||||
|
@ -60,6 +60,7 @@ public class SkillScroller implements SkillCastingListener {
|
|||||||
Player player = playerData.getPlayer();
|
Player player = playerData.getPlayer();
|
||||||
if (player.getGameMode() == GameMode.CREATIVE && !MMOCore.plugin.configManager.canCreativeCast)
|
if (player.getGameMode() == GameMode.CREATIVE && !MMOCore.plugin.configManager.canCreativeCast)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (event.getPressed() == enterKey) {
|
if (event.getPressed() == enterKey) {
|
||||||
|
|
||||||
// Leave casting mode
|
// Leave casting mode
|
||||||
|
Loading…
Reference in New Issue
Block a user