mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-11 11:40:40 +00:00
Finished implementing all sub abilities.
Does not support addons yet.
This commit is contained in:
parent
7684931ebe
commit
55d33dafca
14 changed files with 305 additions and 32 deletions
|
@ -32,6 +32,7 @@ public class AbilityModuleManager {
|
|||
public static HashSet<String> explodeabilities;
|
||||
public static HashSet<String> metalbendingabilities;
|
||||
public static HashSet<String> earthsubabilities;
|
||||
public static HashSet<String> subabilities;
|
||||
|
||||
public static HashMap<String, String> descriptions;
|
||||
|
||||
|
@ -56,6 +57,7 @@ public class AbilityModuleManager {
|
|||
igniteabilities = new HashSet<String>();
|
||||
metalbendingabilities = new HashSet<String>();
|
||||
earthsubabilities = new HashSet<String>();
|
||||
subabilities = new HashSet<String>();
|
||||
ability = loader.load(AbilityModule.class);
|
||||
disabledStockAbilities = new HashSet<String>();
|
||||
fill();
|
||||
|
@ -78,6 +80,9 @@ public class AbilityModuleManager {
|
|||
if (a == StockAbilities.AirBurst) shiftabilities.add(a.name());
|
||||
if (a == StockAbilities.AirShield) shiftabilities.add(a.name());
|
||||
if (a == StockAbilities.Flight) shiftabilities.add(a.name());
|
||||
|
||||
// Air Sub Abilities
|
||||
if (a == StockAbilities.Flight) subabilities.add(a.name());
|
||||
}
|
||||
}
|
||||
else if (StockAbilities.isWaterbending(a)) {
|
||||
|
@ -96,6 +101,13 @@ public class AbilityModuleManager {
|
|||
if (a == StockAbilities.WaterManipulation) shiftabilities.add(a.name());
|
||||
if (a == StockAbilities.IceSpike) shiftabilities.add(a.name());
|
||||
if (a == StockAbilities.IceBlast) shiftabilities.add(a.name());
|
||||
|
||||
// Water Sub Abilities
|
||||
if (a == StockAbilities.HealingWaters) subabilities.add(a.name());
|
||||
if (a == StockAbilities.Bloodbending) subabilities.add(a.name());
|
||||
if (a == StockAbilities.PhaseChange) subabilities.add(a.name());
|
||||
if (a == StockAbilities.IceSpike) subabilities.add(a.name());
|
||||
if (a == StockAbilities.IceBlast) subabilities.add(a.name());
|
||||
}
|
||||
}
|
||||
else if (StockAbilities.isEarthbending(a)) {
|
||||
|
@ -111,15 +123,13 @@ public class AbilityModuleManager {
|
|||
if (a == StockAbilities.EarthTunnel) shiftabilities.add(a.name());
|
||||
if (a == StockAbilities.EarthGrab) shiftabilities.add(a.name());
|
||||
if (a == StockAbilities.LavaFlow) shiftabilities.add(a.name());
|
||||
if (a == StockAbilities.Extraction) metalbendingabilities.add(a.name());
|
||||
if (a == StockAbilities.MetalClips) metalbendingabilities.add(a.name());
|
||||
if (a == StockAbilities.MetalClips) shiftabilities.add(a.name());
|
||||
if (a == StockAbilities.EarthSmash) shiftabilities.add(a.name());
|
||||
|
||||
// Earth Sub Abilities
|
||||
if (a == StockAbilities.MetalClips) earthsubabilities.add(a.name());
|
||||
if (a == StockAbilities.Extraction) earthsubabilities.add(a.name());
|
||||
if (a == StockAbilities.LavaFlow) earthsubabilities.add(a.name());
|
||||
if (a == StockAbilities.MetalClips) subabilities.add(a.name());
|
||||
if (a == StockAbilities.Extraction) subabilities.add(a.name());
|
||||
if (a == StockAbilities.LavaFlow) subabilities.add(a.name());
|
||||
// if (a == StockAbilities.LavaSurge) earthsubabilities.add(a.name());
|
||||
|
||||
}
|
||||
|
@ -139,6 +149,10 @@ public class AbilityModuleManager {
|
|||
if (a == StockAbilities.FireBlast) shiftabilities.add(a.name());
|
||||
if (a == StockAbilities.Blaze) shiftabilities.add(a.name());
|
||||
if (a == StockAbilities.FireBurst) shiftabilities.add(a.name());
|
||||
|
||||
// Fire Sub Abilities
|
||||
if (a == StockAbilities.Lightning) subabilities.add(a.name());
|
||||
if (a == StockAbilities.Combustion) subabilities.add(a.name());
|
||||
}
|
||||
}
|
||||
else if (StockAbilities.isChiBlocking(a)) {
|
||||
|
@ -175,16 +189,12 @@ public class AbilityModuleManager {
|
|||
}
|
||||
if (ab.getElement() == Element.Air.toString()) airbendingabilities.add(ab.getName());
|
||||
if (ab.getElement() == Element.Water.toString()) waterbendingabilities.add(ab.getName());
|
||||
if (ab.getElement() == Element.Earth.toString())
|
||||
{
|
||||
earthbendingabilities.add(ab.getName());
|
||||
if(ab.isSubAbility())
|
||||
earthsubabilities.add(ab.getName());
|
||||
}
|
||||
if (ab.getElement() == Element.Earth.toString()) earthbendingabilities.add(ab.getName());
|
||||
if (ab.getElement() == Element.Fire.toString()) firebendingabilities.add(ab.getName());
|
||||
if (ab.getElement() == Element.Chi.toString()) chiabilities.add(ab.getName());
|
||||
if (ab.isShiftAbility()) shiftabilities.add(ab.getName());
|
||||
if (ab.isHarmlessAbility()) harmlessabilities.add(ab.getName());
|
||||
if (ab.isSubAbility()) subabilities.add(ab.getName());
|
||||
// if (ab.isMetalbendingAbility()) metalbendingabilities.add(ab.getName());
|
||||
descriptions.put(ab.getName(), ab.getDescription());
|
||||
authors.put(ab.getName(), ab.getAuthor());
|
||||
|
|
|
@ -41,6 +41,138 @@ public enum StockAbilities {
|
|||
HighJump, RapidPunch, Paralyze, Smokescreen, WarriorStance, AcrobatStance;
|
||||
}
|
||||
|
||||
private enum FlightAbilities
|
||||
{
|
||||
Flight;
|
||||
}
|
||||
|
||||
private enum SpiritualProjectionAbilities
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
private enum CombustionbendingAbilities
|
||||
{
|
||||
Combustion;
|
||||
}
|
||||
|
||||
private enum LightningbendingAbilities
|
||||
{
|
||||
Lightning;
|
||||
}
|
||||
|
||||
private enum LavabendingAbilities
|
||||
{
|
||||
LavaFlow;
|
||||
}
|
||||
|
||||
private enum MetalbendingAbilities
|
||||
{
|
||||
Extraction, MetalClips;
|
||||
}
|
||||
|
||||
private enum SandbendingAbilities
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
private enum HealingAbilities
|
||||
{
|
||||
HealingWaters;
|
||||
}
|
||||
|
||||
private enum IcebendingAbilities
|
||||
{
|
||||
PhaseChange, IceBlast, IceSpike;
|
||||
}
|
||||
|
||||
private enum BloodbendingAbilities
|
||||
{
|
||||
Bloodbending;
|
||||
}
|
||||
|
||||
private enum PlantbendingAbilities
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
public static boolean isFlightAbility(String ability)
|
||||
{
|
||||
for(FlightAbilities a : FlightAbilities.values())
|
||||
if(a.name().equalsIgnoreCase(ability)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isSpiritualProjectionAbility(String ability)
|
||||
{
|
||||
for(SpiritualProjectionAbilities a : SpiritualProjectionAbilities.values())
|
||||
if(a.name().equalsIgnoreCase(ability)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isCombustionbendingAbility(String ability)
|
||||
{
|
||||
for(CombustionbendingAbilities a : CombustionbendingAbilities.values())
|
||||
if(a.name().equalsIgnoreCase(ability)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isLightningbendingAbility(String ability)
|
||||
{
|
||||
for(LightningbendingAbilities a : LightningbendingAbilities.values())
|
||||
if(a.name().equalsIgnoreCase(ability)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isLavabendingAbility(String ability)
|
||||
{
|
||||
for(LavabendingAbilities a : LavabendingAbilities.values())
|
||||
if(a.name().equalsIgnoreCase(ability)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isMetalbendingAbility(String ability)
|
||||
{
|
||||
for(MetalbendingAbilities a : MetalbendingAbilities.values())
|
||||
if(a.name().equalsIgnoreCase(ability)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isSandbendingAbility(String ability)
|
||||
{
|
||||
for(SandbendingAbilities a : SandbendingAbilities.values())
|
||||
if(a.name().equalsIgnoreCase(ability)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isHealingAbility(String ability)
|
||||
{
|
||||
for(HealingAbilities a : HealingAbilities.values())
|
||||
if(a.name().equalsIgnoreCase(ability)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isIcebendingAbility(String ability)
|
||||
{
|
||||
for(IcebendingAbilities a : IcebendingAbilities.values())
|
||||
if(a.name().equalsIgnoreCase(ability)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isBloodbendingAbility(String ability)
|
||||
{
|
||||
for(BloodbendingAbilities a : BloodbendingAbilities.values())
|
||||
if(a.name().equalsIgnoreCase(ability)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isPlantbendingAbility(String ability)
|
||||
{
|
||||
for(PlantbendingAbilities a : PlantbendingAbilities.values())
|
||||
if(a.name().equalsIgnoreCase(ability)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isStockAbility(String ability) {
|
||||
for (StockAbilities a: StockAbilities.values()) {
|
||||
if (a.name().equalsIgnoreCase(ability)) return true;
|
||||
|
|
|
@ -622,7 +622,11 @@ public class Commands {
|
|||
}
|
||||
for (String st: AbilityModuleManager.airbendingabilities) {
|
||||
if (Methods.hasPermission((Player) s, st)) {
|
||||
s.sendMessage(Methods.getAirColor() + st);
|
||||
if (Methods.isSubAbility(st)) {
|
||||
s.sendMessage(Methods.getSubBendingColor(Element.Air) + st);
|
||||
} else {
|
||||
s.sendMessage(Methods.getAirColor() + st);
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
@ -634,7 +638,11 @@ public class Commands {
|
|||
}
|
||||
for (String st: AbilityModuleManager.waterbendingabilities) {
|
||||
if (Methods.hasPermission((Player) s, st)) {
|
||||
s.sendMessage(Methods.getWaterColor() + st);
|
||||
if (Methods.isSubAbility(st)) {
|
||||
s.sendMessage(Methods.getSubBendingColor(Element.Water) + st);
|
||||
} else {
|
||||
s.sendMessage(Methods.getWaterColor() + st);
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
@ -646,8 +654,8 @@ public class Commands {
|
|||
}
|
||||
for (String st: AbilityModuleManager.earthbendingabilities) {
|
||||
if (Methods.hasPermission((Player) s, st)) {
|
||||
if (Methods.isSubAbility(Element.Earth, st)) {
|
||||
s.sendMessage(Methods.getMetalbendingColor() + st);
|
||||
if (Methods.isSubAbility(st)) {
|
||||
s.sendMessage(Methods.getSubBendingColor(Element.Earth) + st);
|
||||
} else {
|
||||
s.sendMessage(Methods.getEarthColor() + st);
|
||||
}
|
||||
|
@ -662,7 +670,11 @@ public class Commands {
|
|||
}
|
||||
for (String st: AbilityModuleManager.firebendingabilities) {
|
||||
if (Methods.hasPermission((Player) s, st)) {
|
||||
s.sendMessage(Methods.getFireColor() + st);
|
||||
if (Methods.isSubAbility(st)) {
|
||||
s.sendMessage(Methods.getSubBendingColor(Element.Fire) + st);
|
||||
} else {
|
||||
s.sendMessage(Methods.getFireColor() + st);
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
@ -825,27 +837,45 @@ public class Commands {
|
|||
s.sendMessage(un + " - ");
|
||||
if (Methods.isBender(un, Element.Air)) {
|
||||
s.sendMessage(Methods.getAirColor() + "- Airbender");
|
||||
if(Methods.canAirFlight(p)) {
|
||||
s.sendMessage(Methods.getSubBendingColor(Element.Air) + " Can Fly");
|
||||
}
|
||||
if(Methods.canUseSpiritualProjection(p)) {
|
||||
s.sendMessage(Methods.getSubBendingColor(Element.Air) + " Can use Spiritual Projection");
|
||||
}
|
||||
}
|
||||
if (Methods.isBender(un, Element.Water)) {
|
||||
s.sendMessage(Methods.getWaterColor() + "- Waterbender");
|
||||
if (Methods.canPlantbend(p)) {
|
||||
s.sendMessage(Methods.getWaterColor() + " Can Plantbend");
|
||||
s.sendMessage(Methods.getSubBendingColor(Element.Water) + " Can Plantbend");
|
||||
}
|
||||
if (Methods.canBloodbend(p)) {
|
||||
s.sendMessage(Methods.getWaterColor() + " Can Bloodbend");
|
||||
s.sendMessage(Methods.getSubBendingColor(Element.Water) + " Can Bloodbend");
|
||||
}
|
||||
if (Methods.canIcebend(p)) {
|
||||
s.sendMessage(Methods.getSubBendingColor(Element.Water) + " Can Icebend");
|
||||
}
|
||||
}
|
||||
if (Methods.isBender(un, Element.Earth)) {
|
||||
s.sendMessage(Methods.getEarthColor() + "- Earthbender");
|
||||
if (Methods.canMetalbend(p)) {
|
||||
s.sendMessage(Methods.getMetalbendingColor() + " Can Metalbend");
|
||||
s.sendMessage(Methods.getSubBendingColor(Element.Earth) + " Can Metalbend");
|
||||
}
|
||||
if (Methods.canLavabend(p)) {
|
||||
s.sendMessage(Methods.getMetalbendingColor() + " Can Lavabend");
|
||||
s.sendMessage(Methods.getSubBendingColor(Element.Earth) + " Can Lavabend");
|
||||
}
|
||||
if (Methods.canSandbend(p)) {
|
||||
s.sendMessage(Methods.getSubBendingColor(Element.Earth) + " Can Sandbend");
|
||||
}
|
||||
}
|
||||
if (Methods.isBender(un, Element.Fire)) {
|
||||
s.sendMessage(Methods.getFireColor() + "- Firebender");
|
||||
if(Methods.canCombustionbend(p)) {
|
||||
s.sendMessage(Methods.getSubBendingColor(Element.Fire) + " Can Combustionbend");
|
||||
}
|
||||
if(Methods.canLightningbend(p)) {
|
||||
s.sendMessage(Methods.getSubBendingColor(Element.Fire) + " Can Lightningbend");
|
||||
}
|
||||
}
|
||||
if (Methods.isBender(un, Element.Chi)) {
|
||||
s.sendMessage(Methods.getChiColor() + "- ChiBlocker");
|
||||
|
|
|
@ -49,10 +49,13 @@ public class ConfigManager {
|
|||
config.addDefault("Properties.Chat.Prefixes.Avatar", "[Avatar]");
|
||||
config.addDefault("Properties.Chat.Colors.Avatar", "DARK_PURPLE");
|
||||
config.addDefault("Properties.Chat.Colors.Air", "GRAY");
|
||||
config.addDefault("Properties.Chat.Colors.AirSub", "DARK_GRAY");
|
||||
config.addDefault("Properties.Chat.Colors.Water", "AQUA");
|
||||
config.addDefault("Properties.Chat.Colors.WaterSub", "DARK_AQUA");
|
||||
config.addDefault("Properties.Chat.Colors.Earth", "GREEN");
|
||||
config.addDefault("Properties.Chat.Colors.Metalbending", "DARK_GREEN");
|
||||
config.addDefault("Properties.Chat.Colors.EarthSub", "DARK_GREEN");
|
||||
config.addDefault("Properties.Chat.Colors.Fire", "RED");
|
||||
config.addDefault("Properties.Chat.Colors.FireSub", "DARK_RED");
|
||||
config.addDefault("Properties.Chat.Colors.Chi", "GOLD");
|
||||
|
||||
config.addDefault("Properties.ImportEnabled", true);
|
||||
|
|
|
@ -273,6 +273,7 @@ public class Methods {
|
|||
* @param ability The Ability name to check
|
||||
* @return true If player can bend specified ability and has the permissions to do so
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public static boolean canBend(String player, String ability) {
|
||||
BendingPlayer bPlayer = getBendingPlayer(player);
|
||||
Player p = Bukkit.getPlayer(player);
|
||||
|
@ -295,6 +296,19 @@ public class Methods {
|
|||
if (isEarthAbility(ability) && !isBender(player, Element.Earth)) return false;
|
||||
if (isFireAbility(ability) && !isBender(player, Element.Fire)) return false;
|
||||
if (isChiAbility(ability) && !isBender(player, Element.Chi)) return false;
|
||||
|
||||
if (StockAbilities.isFlightAbility(ability) && !canAirFlight(plugin.getServer().getPlayer(player))) return false;
|
||||
if (StockAbilities.isSpiritualProjectionAbility(ability) && !canUseSpiritualProjection(plugin.getServer().getPlayer(player))) return false;
|
||||
if (StockAbilities.isCombustionbendingAbility(ability) && !canCombustionbend(plugin.getServer().getPlayer(player))) return false;
|
||||
if (StockAbilities.isLightningbendingAbility(ability) && !canLightningbend(plugin.getServer().getPlayer(player))) return false;
|
||||
if (StockAbilities.isSandbendingAbility(ability) && !canSandbend(plugin.getServer().getPlayer(player))) return false;
|
||||
if (StockAbilities.isMetalbendingAbility(ability) && !canMetalbend(plugin.getServer().getPlayer(player))) return false;
|
||||
if (StockAbilities.isLavabendingAbility(ability) && !canLavabend(plugin.getServer().getPlayer(player))) return false;
|
||||
if (StockAbilities.isIcebendingAbility(ability) && !canIcebend(plugin.getServer().getPlayer(player))) return false;
|
||||
if (StockAbilities.isHealingAbility(ability) && !canWaterHeal(plugin.getServer().getPlayer(player))) return false;
|
||||
if (StockAbilities.isPlantbendingAbility(ability) && !canPlantbend(plugin.getServer().getPlayer(player))) return false;
|
||||
if (StockAbilities.isBloodbendingAbility(ability) && !canBloodbend(plugin.getServer().getPlayer(player))) return false;
|
||||
|
||||
if (isRegionProtectedFromBuild(p, ability, p.getLocation())) return false;
|
||||
if (Paralyze.isParalyzed(p) || Bloodbending.isBloodbended(p)) return false;
|
||||
if (MetalClips.isControlled(p)) return false;
|
||||
|
@ -322,10 +336,52 @@ public class Methods {
|
|||
* @return true If player has permission node "bending.earth.bloodbending"
|
||||
*/
|
||||
public static boolean canBloodbend(Player player) {
|
||||
if (player.hasPermission("bending.ability.bloodbending")) return true;
|
||||
if (player.hasPermission("bending.water.bloodbending")) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean canIcebend(Player player)
|
||||
{
|
||||
if(player.hasPermission("bending.water.icebending")) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean canWaterHeal(Player player)
|
||||
{
|
||||
if(player.hasPermission("bending.water.healing")) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean canCombustionbend(Player player)
|
||||
{
|
||||
if(player.hasPermission("bending.fire.combustionbending")) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean canLightningbend(Player player)
|
||||
{
|
||||
if(player.hasPermission("bending.fire.lightningbending")) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean canAirFlight(Player player)
|
||||
{
|
||||
if(player.hasPermission("bending.air.flight")) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean canUseSpiritualProjection(Player player)
|
||||
{
|
||||
if(player.hasPermission("bending.air.spiritualprojection")) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean canSandbend(Player player)
|
||||
{
|
||||
if(player.hasPermission("bending.earth.sandbending")) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks to see if a player can MetalBend.
|
||||
* @param player The player to check
|
||||
|
@ -340,10 +396,8 @@ public class Methods {
|
|||
return player.hasPermission("bending.earth.lavabending");
|
||||
}
|
||||
|
||||
public static boolean isSubAbility(Element element, String ability) {
|
||||
if (element == Element.Earth) {
|
||||
if (AbilityModuleManager.earthsubabilities.contains(ability)) return true;
|
||||
}
|
||||
public static boolean isSubAbility(String ability) {
|
||||
if (AbilityModuleManager.subabilities.contains(ability)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -353,7 +407,7 @@ public class Methods {
|
|||
* @return true If player has permission node "bending.ability.plantbending"
|
||||
*/
|
||||
public static boolean canPlantbend(Player player) {
|
||||
return player.hasPermission("bending.ability.plantbending");
|
||||
return player.hasPermission("bending.water.plantbending");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -840,6 +894,23 @@ public class Methods {
|
|||
public static ChatColor getMetalbendingColor() {
|
||||
return ChatColor.valueOf(plugin.getConfig().getString("Properties.Chat.Colors.Metalbending"));
|
||||
}
|
||||
|
||||
public static ChatColor getSubBendingColor(Element element)
|
||||
{
|
||||
switch(element)
|
||||
{
|
||||
case Fire:
|
||||
return ChatColor.valueOf(plugin.getConfig().getString("Properties.Chat.Colors.FireSub"));
|
||||
case Air:
|
||||
return ChatColor.valueOf(plugin.getConfig().getString("Properties.Chat.Colors.AirSub"));
|
||||
case Water:
|
||||
return ChatColor.valueOf(plugin.getConfig().getString("Properties.Chat.Colors.Watersub"));
|
||||
case Earth:
|
||||
return ChatColor.valueOf(plugin.getConfig().getString("Properties.Chat.Colors.Earthsub"));
|
||||
}
|
||||
|
||||
return getAvatarColor();
|
||||
}
|
||||
|
||||
public static Vector getOrthogonalVector(Vector axis, double degrees, double length) {
|
||||
|
||||
|
|
|
@ -431,7 +431,7 @@ public class PKListener implements Listener {
|
|||
new Suffocate(player);
|
||||
}
|
||||
if(abil.equalsIgnoreCase("Flight")) {
|
||||
if(player.isSneaking()) return;
|
||||
if(player.isSneaking() || !Methods.canAirFlight(player)) return;
|
||||
new com.projectkorra.ProjectKorra.airbending.FlightAbility(player);
|
||||
}
|
||||
|
||||
|
@ -796,7 +796,8 @@ public class PKListener implements Listener {
|
|||
new AirSwipe(player);
|
||||
}
|
||||
if(abil.equalsIgnoreCase("Flight")) {
|
||||
if(!ProjectKorra.plugin.getConfig().getBoolean("Abilities.Air.Flight.HoverEnabled")) return;
|
||||
if(!ProjectKorra.plugin.getConfig().getBoolean("Abilities.Air.Flight.HoverEnabled")
|
||||
|| !Methods.canAirFlight(player)) return;
|
||||
|
||||
if(com.projectkorra.ProjectKorra.airbending.FlightAbility.instances.containsKey(event.getPlayer().getName())) {
|
||||
if(com.projectkorra.ProjectKorra.airbending.FlightAbility.isHovering(event.getPlayer())) {
|
||||
|
|
|
@ -80,6 +80,9 @@ public class LavaFlow
|
|||
|
||||
public LavaFlow(Player player, AbilityType type)
|
||||
{
|
||||
if(!Methods.canLavabend(player))
|
||||
return;
|
||||
|
||||
time = System.currentTimeMillis();
|
||||
this.player = player;
|
||||
this.type = type;
|
||||
|
|
|
@ -26,7 +26,9 @@ public class FreezeMelt {
|
|||
|
||||
|
||||
public FreezeMelt(Player player) {
|
||||
|
||||
if(!Methods.canIcebend(player))
|
||||
return;
|
||||
|
||||
int range = (int) Methods.waterbendingNightAugment(defaultrange, player.getWorld());
|
||||
int radius = (int) Methods.waterbendingNightAugment(defaultradius, player.getWorld());
|
||||
if (AvatarState.isAvatarState(player)) {
|
||||
|
|
|
@ -47,6 +47,9 @@ public class IceBlast {
|
|||
private double defaultdamage = DAMAGE;
|
||||
|
||||
public IceBlast(Player player) {
|
||||
if(!Methods.canIcebend(player))
|
||||
return;
|
||||
|
||||
block(player);
|
||||
range = Methods.waterbendingNightAugment(defaultrange, player.getWorld());
|
||||
this.player = player;
|
||||
|
|
|
@ -51,6 +51,9 @@ public class IceSpike2 {
|
|||
private double defaultdamage = DAMAGE;
|
||||
|
||||
public IceSpike2(Player player) {
|
||||
if(!Methods.canIcebend(player))
|
||||
return;
|
||||
|
||||
block(player);
|
||||
if (Methods.canPlantbend(player))
|
||||
plantbending = true;
|
||||
|
|
|
@ -22,7 +22,9 @@ public class Melt {
|
|||
private static final byte full = 0x0;
|
||||
|
||||
public Melt(Player player) {
|
||||
|
||||
if(!Methods.canIcebend(player))
|
||||
return;
|
||||
|
||||
int range = (int) Methods.waterbendingNightAugment(defaultrange, player.getWorld());
|
||||
int radius = (int) Methods.waterbendingNightAugment(defaultradius, player.getWorld());
|
||||
|
||||
|
|
|
@ -113,6 +113,9 @@ public class WaterWall {
|
|||
}
|
||||
|
||||
private void freezeThaw() {
|
||||
if(!Methods.canIcebend(player))
|
||||
return;
|
||||
|
||||
if (frozen) {
|
||||
thaw();
|
||||
} else {
|
||||
|
|
|
@ -410,6 +410,10 @@ public class Wave {
|
|||
}
|
||||
|
||||
private void freeze() {
|
||||
|
||||
if(!Methods.canIcebend(player))
|
||||
return;
|
||||
|
||||
clearWave();
|
||||
|
||||
double freezeradius = radius;
|
||||
|
|
|
@ -67,6 +67,7 @@ permissions:
|
|||
bending.ability.Tornado: true
|
||||
bending.ability.AirCombo: true
|
||||
bending.air.passive: true
|
||||
bending.air.flight: true
|
||||
bending.water:
|
||||
default: true
|
||||
description: Grants access to most waterbending abilities.
|
||||
|
@ -83,9 +84,11 @@ permissions:
|
|||
bending.ability.WaterSpout: true
|
||||
bending.ability.WaterSpout.Wave: true
|
||||
bending.ability.WaterCombo: true
|
||||
bending.ability.Plantbending: true
|
||||
bending.water.plantbending: true
|
||||
bending.message.nightmessage: true
|
||||
bending.water.passive: true
|
||||
bending.water.icebending: true
|
||||
bending.water.healing: true
|
||||
bending.earth:
|
||||
default: true
|
||||
description: Grants access to all Earthbending abilities.
|
||||
|
@ -106,6 +109,7 @@ permissions:
|
|||
bending.earth.passive: true
|
||||
bending.earth.metalbending: true
|
||||
bending.earth.lavabending: true
|
||||
bending.earth.sandbending: true
|
||||
bending.earth.grapplinghook: true
|
||||
bending.ability.LavaSurge: true
|
||||
bending.ability.LavaFlow: true
|
||||
|
@ -127,6 +131,8 @@ permissions:
|
|||
bending.ability.FireCombo: true
|
||||
bending.message.daymessage: true
|
||||
bending.fire.passive: true
|
||||
bending.fire.lightningbending: true
|
||||
bending.fire.combustionbending: true
|
||||
bending.chi:
|
||||
default: true
|
||||
description: Grants access to all ChiBlocking abilities.
|
||||
|
|
Loading…
Reference in a new issue