mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-06-10 22:34:57 +00:00
2cb73c71ec
* Fix chi abilities appearing to strike twice, implement catapult 2.0, and fix water sources being removed by breaking them * Small changes for loony (visual and time) * Completely rewrite catapult functions and repair water abilities allowing plant sources to be broken upon selection * Increase length of moveEarth call in Catapult and add more configuration options * Fix my dumb mistake of using a bitwise operator * Allow tempblock usage for iceblast
35 lines
1.4 KiB
Java
35 lines
1.4 KiB
Java
package com.projectkorra.projectkorra.firebending.passive;
|
|
|
|
import org.bukkit.Bukkit;
|
|
import org.bukkit.entity.Player;
|
|
|
|
import com.projectkorra.projectkorra.BendingPlayer;
|
|
import com.projectkorra.projectkorra.Element;
|
|
import com.projectkorra.projectkorra.ability.CoreAbility;
|
|
import com.projectkorra.projectkorra.command.Commands;
|
|
import com.projectkorra.projectkorra.configuration.ConfigManager;
|
|
import com.projectkorra.projectkorra.earthbending.Tremorsense;
|
|
import com.projectkorra.projectkorra.firebending.Illumination;
|
|
|
|
public class FirePassive {
|
|
|
|
public static void handlePassive() {
|
|
if (Commands.isToggledForAll && ConfigManager.defaultConfig.get().getBoolean("Properties.TogglePassivesWithAllBending")) {
|
|
return;
|
|
}
|
|
for (Player player : Bukkit.getOnlinePlayers()) {
|
|
BendingPlayer bPlayer = BendingPlayer.getBendingPlayer(player);
|
|
if (bPlayer != null && bPlayer.canBendPassive(Element.FIRE) && bPlayer.canUsePassive(Element.FIRE)) {
|
|
if (player.getFireTicks() > 80) {
|
|
player.setFireTicks(80);
|
|
}
|
|
|
|
if (bPlayer != null && !CoreAbility.hasAbility(player, Illumination.class) && !CoreAbility.hasAbility(player, Tremorsense.class) && bPlayer.canBendIgnoreBinds(CoreAbility.getAbility("Illumination")) && ConfigManager.defaultConfig.get().getBoolean("Abilities.Fire.Illumination.Passive")) {
|
|
if (bPlayer.isIlluminating()) {
|
|
new Illumination(player);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |