mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-11 03:30:10 +00:00
Combos now check for specific elements
This commit is contained in:
parent
1d3ded62f6
commit
913ab45872
3 changed files with 15 additions and 6 deletions
|
@ -13,6 +13,7 @@ import org.bukkit.util.Vector;
|
|||
import com.projectkorra.ProjectKorra.BendingPlayer;
|
||||
import com.projectkorra.ProjectKorra.ComboManager.ClickType;
|
||||
import com.projectkorra.ProjectKorra.Commands;
|
||||
import com.projectkorra.ProjectKorra.Element;
|
||||
import com.projectkorra.ProjectKorra.Flight;
|
||||
import com.projectkorra.ProjectKorra.Methods;
|
||||
import com.projectkorra.ProjectKorra.ProjectKorra;
|
||||
|
@ -99,11 +100,13 @@ public class AirCombo {
|
|||
public AirCombo(Player player, String ability) {
|
||||
if (!enabled || !player.hasPermission("bending.ability.AirCombo"))
|
||||
return;
|
||||
if (Methods.isRegionProtectedFromBuild(player, "AirBlast",
|
||||
player.getLocation()))
|
||||
if(!Methods.getBendingPlayer(player.getName()).hasElement(Element.Air))
|
||||
return;
|
||||
if (Commands.isToggledForAll)
|
||||
return;
|
||||
if (Methods.isRegionProtectedFromBuild(player, "AirBlast",
|
||||
player.getLocation()))
|
||||
return;
|
||||
if (!Methods.getBendingPlayer(player.getName()).isToggled())
|
||||
return;
|
||||
time = System.currentTimeMillis();
|
||||
|
|
|
@ -18,6 +18,7 @@ import org.bukkit.util.Vector;
|
|||
import com.projectkorra.ProjectKorra.BendingPlayer;
|
||||
import com.projectkorra.ProjectKorra.ComboManager.ClickType;
|
||||
import com.projectkorra.ProjectKorra.Commands;
|
||||
import com.projectkorra.ProjectKorra.Element;
|
||||
import com.projectkorra.ProjectKorra.Methods;
|
||||
import com.projectkorra.ProjectKorra.ProjectKorra;
|
||||
import com.projectkorra.ProjectKorra.Ability.AvatarState;
|
||||
|
@ -103,11 +104,13 @@ public class FireCombo {
|
|||
// Dont' call Methods.canBind directly, it doesn't let you combo as fast
|
||||
if (!enabled || !player.hasPermission("bending.ability.FireCombo"))
|
||||
return;
|
||||
if (Methods.isRegionProtectedFromBuild(player, "Blaze",
|
||||
player.getLocation()))
|
||||
if(!Methods.getBendingPlayer(player.getName()).hasElement(Element.Fire))
|
||||
return;
|
||||
if (Commands.isToggledForAll)
|
||||
return;
|
||||
if (Methods.isRegionProtectedFromBuild(player, "Blaze",
|
||||
player.getLocation()))
|
||||
return;
|
||||
if (!Methods.getBendingPlayer(player.getName()).isToggled())
|
||||
return;
|
||||
time = System.currentTimeMillis();
|
||||
|
|
|
@ -15,6 +15,7 @@ import org.bukkit.util.Vector;
|
|||
|
||||
import com.projectkorra.ProjectKorra.BendingPlayer;
|
||||
import com.projectkorra.ProjectKorra.Commands;
|
||||
import com.projectkorra.ProjectKorra.Element;
|
||||
import com.projectkorra.ProjectKorra.Methods;
|
||||
import com.projectkorra.ProjectKorra.ProjectKorra;
|
||||
import com.projectkorra.ProjectKorra.TempBlock;
|
||||
|
@ -81,11 +82,13 @@ public class WaterCombo {
|
|||
public WaterCombo(Player player, String ability) {
|
||||
if (!enabled || !player.hasPermission("bending.ability.WaterCombo"))
|
||||
return;
|
||||
if (Methods.isRegionProtectedFromBuild(player, "WaterManipulation",
|
||||
player.getLocation()))
|
||||
if(!Methods.getBendingPlayer(player.getName()).hasElement(Element.Water))
|
||||
return;
|
||||
if (Commands.isToggledForAll)
|
||||
return;
|
||||
if (Methods.isRegionProtectedFromBuild(player, "WaterManipulation",
|
||||
player.getLocation()))
|
||||
return;
|
||||
if (!Methods.getBendingPlayer(player.getName()).isToggled())
|
||||
return;
|
||||
time = System.currentTimeMillis();
|
||||
|
|
Loading…
Reference in a new issue