mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-11 11:40:40 +00:00
Add config options for AirBurst
FallThreshold - Amount of blocks to fall to activate. PushFactor - Pretty self explanatory ChargeTime - Time in ms it takes to charge an AirBurst
This commit is contained in:
parent
34e072240a
commit
6c8ebd3b5d
3 changed files with 12 additions and 3 deletions
|
@ -127,6 +127,9 @@ public class ConfigManager {
|
||||||
+ "of air in front of you, or click to release the burst in a sphere around you. "
|
+ "of air in front of you, or click to release the burst in a sphere around you. "
|
||||||
+ "Additionally, having this ability selected when you land on the ground from a "
|
+ "Additionally, having this ability selected when you land on the ground from a "
|
||||||
+ "large enough fall will create a burst of air around you.");
|
+ "large enough fall will create a burst of air around you.");
|
||||||
|
config.addDefault("Abilities.Air.AirBurst.FallThreshold", 10);
|
||||||
|
config.addDefault("Abilities.Air.AirBurst.PushFactor", 1.5);
|
||||||
|
config.addDefault("Abilities.Air.AirBurst.ChargeTime", 1750);
|
||||||
|
|
||||||
config.addDefault("Abilities.Air.AirScooter.Enabled", true);
|
config.addDefault("Abilities.Air.AirScooter.Enabled", true);
|
||||||
config.addDefault("Abilities.Air.AirScooter.Description", "AirScooter is a fast means of transportation. To use, sprint, jump then click with "
|
config.addDefault("Abilities.Air.AirScooter.Description", "AirScooter is a fast means of transportation. To use, sprint, jump then click with "
|
||||||
|
|
|
@ -4,6 +4,7 @@ import java.util.ArrayList;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
|
import org.bukkit.configuration.file.FileConfiguration;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
@ -17,14 +18,16 @@ public class AirBurst {
|
||||||
private static ConcurrentHashMap<Player, AirBurst> instances = new ConcurrentHashMap<Player, AirBurst>();
|
private static ConcurrentHashMap<Player, AirBurst> instances = new ConcurrentHashMap<Player, AirBurst>();
|
||||||
private static ConcurrentHashMap<String, Long> cooldowns = new ConcurrentHashMap<String, Long>();
|
private static ConcurrentHashMap<String, Long> cooldowns = new ConcurrentHashMap<String, Long>();
|
||||||
|
|
||||||
private static double threshold = 10;
|
static FileConfiguration config = ProjectKorra.plugin.getConfig();
|
||||||
private static double pushfactor = 1.5;
|
|
||||||
|
private static double threshold = config.getDouble("Abilities.Air.AirBurst.FallThreshold");
|
||||||
|
private static double pushfactor = config.getDouble("Abilities.Air.AirBurst.PushFactor");
|
||||||
private static double deltheta = 10;
|
private static double deltheta = 10;
|
||||||
private static double delphi = 10;
|
private static double delphi = 10;
|
||||||
|
|
||||||
private Player player;
|
private Player player;
|
||||||
private long starttime;
|
private long starttime;
|
||||||
private long chargetime = 1750;
|
private long chargetime = config.getLong("Abilities.Air.AirBurst.ChargeTime");
|
||||||
private boolean charged = false;
|
private boolean charged = false;
|
||||||
|
|
||||||
private ArrayList<Entity> affectedentities = new ArrayList<Entity>();
|
private ArrayList<Entity> affectedentities = new ArrayList<Entity>();
|
||||||
|
|
|
@ -103,6 +103,9 @@ Abilities:
|
||||||
AirBurst:
|
AirBurst:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
Description: "AirBurst is one of the most powerful abilities in an airbender's arsenal. To use, press and hold sneak to charge your burst. Once charged, you can either release sneak to launch a cone-shaped burst of air in front of you, or click to release theb urst in a sphere around you. Additionally, having this ability selected when you land on the ground from a large enough fall will create a burst of air around you."
|
Description: "AirBurst is one of the most powerful abilities in an airbender's arsenal. To use, press and hold sneak to charge your burst. Once charged, you can either release sneak to launch a cone-shaped burst of air in front of you, or click to release theb urst in a sphere around you. Additionally, having this ability selected when you land on the ground from a large enough fall will create a burst of air around you."
|
||||||
|
FallThreshold: 10
|
||||||
|
PushFactor: 1.5
|
||||||
|
ChargeTime: 1750
|
||||||
AirScooter:
|
AirScooter:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
Description: "AirScooter is a fast means of transportation. To use, sprint, jump then click with this ability selected. YOu will hop on a scooter of air and be propelled forward in the direction you're looking (you don't need to press anything). This ability can be used to levitate above liquids, but it cannot go up steep slopes. Any other actions will deactivate this ability."
|
Description: "AirScooter is a fast means of transportation. To use, sprint, jump then click with this ability selected. YOu will hop on a scooter of air and be propelled forward in the direction you're looking (you don't need to press anything). This ability can be used to levitate above liquids, but it cannot go up steep slopes. Any other actions will deactivate this ability."
|
||||||
|
|
Loading…
Reference in a new issue