As of ProjectKorra 1.5.0:Beta 5 Methods.java has a simple ability blocking method called
Methods.blockAbilities(Player, List<String>, Location, double radius).
Player is the player attempting to block the other abilities.
List<String> is the list of ability names that you wish to block.
Location is the location that the blocking will occur.
This method works with the following abilities: FireBlast, EarthBlast, WaterManipulation, AirSwipe, Combustion, FireShield, AirShield, WaterSpout, and AirSpout.
If a collision occurs with one of these abilities then that ability will be destroyed, excluding AirShield and FireShield.
Here is an example of how to block specific abilities:
Methods.blockAbilities(Player, List<String>, Location, double radius).
Player is the player attempting to block the other abilities.
List<String> is the list of ability names that you wish to block.
Location is the location that the blocking will occur.
This method works with the following abilities: FireBlast, EarthBlast, WaterManipulation, AirSwipe, Combustion, FireShield, AirShield, WaterSpout, and AirSpout.
If a collision occurs with one of these abilities then that ability will be destroyed, excluding AirShield and FireShield.
Here is an example of how to block specific abilities:
Code:
List<String> abilityNames = new List<String>();
abilityNames.add("FireBlast");
abilityNames.add("EarthBlast");
abilityNames.add("WaterManipulation");
abilityNames.add("AirSwipe");
abilityNames.add("FireShield");
abilityNames.add("AirShield");
boolean collision = Methods.blockAbilities(player, abilityNames, loc, 3);
if(collision)
{
// Remove my ability here
}