• Hello Guest! Did you know that ProjectKorra has an official Discord server? A lot of discussion about the official server, development process, and community discussion happens over there. Feel free to join now by clicking the link below.

    Join the Discord Server

Complete Method suggestion

Status
Not open for further replies.

Simplicitee

Staff member
Plugin Developer
Verified Member
So since I don't understand github enough to make a pull request, nor do I have the pk code, I'll make this suggestion here.
This would add a method to GeneralMethods:
public static boolean isUsingSneakAbility(Player player)

to make this work (and devs help me here), there would be an "ArrayList<Player> sneaking" in GeneralMethods, and whenever a player is sneaking to use an ability, if and only if the ability doesn't return null, they would be put into the array list. They would be removed when they stop sneaking. The method itself would look like this:
Code:
public static boolean isUsingSneakAbility(Player player) {
    if (sneaking.contains(player)) {
        return true;
    }
    return false:
}
Hope this is fully possible, and if it isn't I'm sure that the devs can figure something out that is similar to this.

Things this could be useful for would be something like a passive ability that uses sneak, where if the player is on an ability that uses sneak they could make it so the passive doesn't activate.
 

AlexTheCoder

Staff member
Plugin Developer
Verified Member
Things this could be useful for would be something like a passive ability that uses sneak, where if the player is on an ability that uses sneak they could make it so the passive doesn't activate.
Pretty sure it already does that, thats why for example in addons there's a settable boolean isSneakAbility();
 

jedk1

New Member
Code:
String ability = GeneralMethods.getBoundAbility(player);
            if (GeneralMethods.canBendPassive(player.getName(), Element.Water)) {
                if (WaterSpout.instances.containsKey(player) || EarthArmor.instances.containsKey(player)) {
                    continue;
                } else if (ability == null || !AbilityModuleManager.shiftabilities.contains(ability)) {
taken from the waterpassive class.
 
Status
Not open for further replies.
Top