mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-11 11:40:40 +00:00
Added get and set Methods to Air abilities
This commit is contained in:
parent
e205ca7005
commit
fdcb34f2ee
8 changed files with 282 additions and 32 deletions
|
@ -326,4 +326,26 @@ public class AirBlast {
|
|||
instances.remove(id);
|
||||
}
|
||||
}
|
||||
|
||||
public Player getPlayer() {
|
||||
return player;
|
||||
}
|
||||
|
||||
public double getRange() {
|
||||
return range;
|
||||
}
|
||||
|
||||
public void setRange(double range) {
|
||||
this.range = range;
|
||||
}
|
||||
|
||||
public double getPushfactor() {
|
||||
return pushfactor;
|
||||
}
|
||||
|
||||
public void setPushfactor(double pushfactor) {
|
||||
this.pushfactor = pushfactor;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -18,11 +18,13 @@ public class AirBubble {
|
|||
|
||||
public static ConcurrentHashMap<Integer, AirBubble> instances = new ConcurrentHashMap<Integer, AirBubble>();
|
||||
|
||||
private static double defaultAirRadius = ProjectKorra.plugin.getConfig().getDouble("Abilities.Air.AirBubble.Radius");
|
||||
private static double defaultWaterRadius = ProjectKorra.plugin.getConfig().getDouble("Abilities.Water.WaterBubble.Radius");
|
||||
private static double DEFAULT_AIR_RADIUS = ProjectKorra.plugin.getConfig().getDouble("Abilities.Air.AirBubble.Radius");
|
||||
private static double DEFAULT_WATER_RADIUS = ProjectKorra.plugin.getConfig().getDouble("Abilities.Water.WaterBubble.Radius");
|
||||
|
||||
private Player player;
|
||||
private double radius;
|
||||
private double defaultAirRadius = DEFAULT_AIR_RADIUS;
|
||||
private double defaultWaterRadius = DEFAULT_WATER_RADIUS;
|
||||
private ConcurrentHashMap<Block, BlockState> waterorigins;
|
||||
|
||||
public AirBubble(Player player) {
|
||||
|
@ -171,4 +173,32 @@ public class AirBubble {
|
|||
+ " replacing itself once the user either gets too far away or selects a different ability.";
|
||||
}
|
||||
|
||||
public Player getPlayer() {
|
||||
return player;
|
||||
}
|
||||
|
||||
public double getRadius() {
|
||||
return radius;
|
||||
}
|
||||
|
||||
public void setRadius(double radius) {
|
||||
this.radius = radius;
|
||||
}
|
||||
|
||||
public double getDefaultAirRadius() {
|
||||
return defaultAirRadius;
|
||||
}
|
||||
|
||||
public void setDefaultAirRadius(double defaultAirRadius) {
|
||||
this.defaultAirRadius = defaultAirRadius;
|
||||
}
|
||||
|
||||
public double getDefaultWaterRadius() {
|
||||
return defaultWaterRadius;
|
||||
}
|
||||
|
||||
public void setDefaultWaterRadius(double defaultWaterRadius) {
|
||||
this.defaultWaterRadius = defaultWaterRadius;
|
||||
}
|
||||
|
||||
}
|
|
@ -18,13 +18,14 @@ public class AirScooter {
|
|||
|
||||
public static ConcurrentHashMap<Player, AirScooter> instances = new ConcurrentHashMap<Player, AirScooter>();
|
||||
|
||||
private static final double speed = ProjectKorra.plugin.getConfig().getDouble("Abilities.Air.AirScooter.Speed");
|
||||
private static final double SPEED = ProjectKorra.plugin.getConfig().getDouble("Abilities.Air.AirScooter.Speed");
|
||||
private static final long interval = 100;
|
||||
private static final double scooterradius = 1;
|
||||
|
||||
private Player player;
|
||||
private Block floorblock;
|
||||
private long time;
|
||||
private double speed = SPEED;
|
||||
private ArrayList<Double> angles = new ArrayList<Double>();
|
||||
|
||||
public AirScooter(Player player) {
|
||||
|
@ -181,4 +182,16 @@ public class AirScooter {
|
|||
}
|
||||
return players;
|
||||
}
|
||||
|
||||
public Player getPlayer() {
|
||||
return player;
|
||||
}
|
||||
|
||||
public double getSpeed() {
|
||||
return speed;
|
||||
}
|
||||
|
||||
public void setSpeed(double speed) {
|
||||
this.speed = speed;
|
||||
}
|
||||
}
|
|
@ -22,10 +22,11 @@ public class AirShield {
|
|||
|
||||
public static ConcurrentHashMap<Integer, AirShield> instances = new ConcurrentHashMap<Integer, AirShield>();
|
||||
|
||||
private static double maxradius = ProjectKorra.plugin.getConfig().getDouble("Abilities.Air.AirShield.Radius");
|
||||
private static double MAX_RADIUS = ProjectKorra.plugin.getConfig().getDouble("Abilities.Air.AirShield.Radius");
|
||||
private static boolean isToggle = ProjectKorra.plugin.getConfig().getBoolean("Abilities.Air.AirShield.IsAvatarStateToggle");
|
||||
private static int numberOfStreams = (int) (.75 * (double) maxradius);
|
||||
private static int numberOfStreams = (int) (.75 * (double) MAX_RADIUS);
|
||||
|
||||
private double maxradius = MAX_RADIUS;
|
||||
private double radius = 2;
|
||||
private double speedfactor;
|
||||
|
||||
|
@ -205,4 +206,16 @@ public class AirShield {
|
|||
+ "This wind will deflect all projectiles and will prevent any creature from "
|
||||
+ "entering it for as long as its maintained. ";
|
||||
}
|
||||
|
||||
public Player getPlayer() {
|
||||
return player;
|
||||
}
|
||||
|
||||
public double getMaxradius() {
|
||||
return maxradius;
|
||||
}
|
||||
|
||||
public void setMaxradius(double maxradius) {
|
||||
this.maxradius = maxradius;
|
||||
}
|
||||
}
|
|
@ -16,12 +16,13 @@ public class AirSpout {
|
|||
|
||||
private static ConcurrentHashMap<Player, AirSpout> instances = new ConcurrentHashMap<Player, AirSpout>();
|
||||
|
||||
private static final double height = ProjectKorra.plugin.getConfig().getDouble("Abilities.Air.AirSpout.Height");
|
||||
private static final double HEIGHT = ProjectKorra.plugin.getConfig().getDouble("Abilities.Air.AirSpout.Height");
|
||||
private static final long interval = 100;
|
||||
|
||||
private Player player;
|
||||
private long time;
|
||||
private int angle = 0;
|
||||
private double height = HEIGHT;
|
||||
|
||||
public AirSpout(Player player) {
|
||||
|
||||
|
@ -167,7 +168,7 @@ public class AirSpout {
|
|||
|
||||
double distance = Math.sqrt(dx * dx + dz * dz);
|
||||
|
||||
if (distance <= radius && dy > 0 && dy < height){
|
||||
if (distance <= radius && dy > 0 && dy < HEIGHT){
|
||||
instances.get(player).remove();
|
||||
removed = true;
|
||||
}
|
||||
|
@ -187,4 +188,16 @@ public class AirSpout {
|
|||
}
|
||||
}
|
||||
|
||||
public Player getPlayer() {
|
||||
return player;
|
||||
}
|
||||
|
||||
public double getHeight() {
|
||||
return height;
|
||||
}
|
||||
|
||||
public void setHeight(double height) {
|
||||
this.height = height;
|
||||
}
|
||||
|
||||
}
|
|
@ -31,10 +31,10 @@ public class AirSuction {
|
|||
private static int ID = Integer.MIN_VALUE;
|
||||
private static final int maxticks = AirBlast.maxticks;
|
||||
|
||||
private static double speed = config.getDouble("Abilities.Air.AirSuction.Speed");
|
||||
private static double range = config.getDouble("Abilities.Air.AirSuction.Range");
|
||||
private static double affectingradius = config.getDouble("Abilities.Air.AirSuction.Radius");
|
||||
private static double pushfactor = config.getDouble("Abilities.Air.AirSuction.Push");
|
||||
private static double SPEED = config.getDouble("Abilities.Air.AirSuction.Speed");
|
||||
private static double RANGE = config.getDouble("Abilities.Air.AirSuction.Range");
|
||||
private static double RADIUS = config.getDouble("Abilities.Air.AirSuction.Radius");
|
||||
private static double PUSH_FACTOR = config.getDouble("Abilities.Air.AirSuction.Push");
|
||||
private static double originselectrange = 10;
|
||||
|
||||
private Location location;
|
||||
|
@ -44,6 +44,10 @@ public class AirSuction {
|
|||
private boolean otherorigin = false;
|
||||
private int id;
|
||||
private int ticks = 0;
|
||||
private double speed = SPEED;
|
||||
private double range = RANGE;
|
||||
private double affectingradius = RADIUS;
|
||||
private double pushfactor = PUSH_FACTOR;
|
||||
// private long time;
|
||||
|
||||
private double speedfactor;
|
||||
|
@ -269,4 +273,40 @@ public class AirSuction {
|
|||
+ "AirSuction to your targeted location.";
|
||||
}
|
||||
|
||||
public Player getPlayer() {
|
||||
return player;
|
||||
}
|
||||
|
||||
public double getSpeed() {
|
||||
return speed;
|
||||
}
|
||||
|
||||
public void setSpeed(double speed) {
|
||||
this.speed = speed;
|
||||
}
|
||||
|
||||
public double getRange() {
|
||||
return range;
|
||||
}
|
||||
|
||||
public void setRange(double range) {
|
||||
this.range = range;
|
||||
}
|
||||
|
||||
public double getAffectingradius() {
|
||||
return affectingradius;
|
||||
}
|
||||
|
||||
public void setAffectingradius(double affectingradius) {
|
||||
this.affectingradius = affectingradius;
|
||||
}
|
||||
|
||||
public double getPushfactor() {
|
||||
return pushfactor;
|
||||
}
|
||||
|
||||
public void setPushfactor(double pushfactor) {
|
||||
this.pushfactor = pushfactor;
|
||||
}
|
||||
|
||||
}
|
|
@ -35,15 +35,15 @@ public class AirSwipe {
|
|||
|
||||
private static int ID = Integer.MIN_VALUE;
|
||||
private static int stepsize = 4;
|
||||
private static int arc = config.getInt("Abilities.Air.AirSwipe.Arc");
|
||||
private static int ARC = config.getInt("Abilities.Air.AirSwipe.Arc");
|
||||
private static int defaultdamage = config.getInt("Abilities.Air.AirSwipe.Damage");
|
||||
private static double defaultpushfactor = config.getDouble("Abilities.Air.AirSwipe.Push");
|
||||
private static double affectingradius = config.getDouble("Abilities.Air.AirSwipe.Radius");
|
||||
private static double range = config.getDouble("Abilities.Air.AirSwipe.Range");
|
||||
private static double speed = config.getDouble("Abilities.Air.AirSwipe.Speed");
|
||||
private static double maxfactor = config.getDouble("Abilities.Air.AirSwipe.ChargeFactor");
|
||||
private static double PUSH_FACTOR = config.getDouble("Abilities.Air.AirSwipe.Push");
|
||||
private static double AFFECTING_RADIUS = config.getDouble("Abilities.Air.AirSwipe.Radius");
|
||||
private static double RANGE = config.getDouble("Abilities.Air.AirSwipe.Range");
|
||||
private static double SPEED = config.getDouble("Abilities.Air.AirSwipe.Speed");
|
||||
private static double MAX_FACTOR = config.getDouble("Abilities.Air.AirSwipe.ChargeFactor");
|
||||
private static byte full = AirBlast.full;
|
||||
private static long maxchargetime = config.getLong("Abilities.Air.AirSwipe.MaxChargeTime");
|
||||
private static long MAX_CHARGE_TIME = config.getLong("Abilities.Air.AirSwipe.MaxChargeTime");
|
||||
|
||||
private double speedfactor;
|
||||
|
||||
|
@ -54,8 +54,14 @@ public class AirSwipe {
|
|||
private Player player;
|
||||
private boolean charging = false;
|
||||
private long time;
|
||||
private int damage = defaultdamage;
|
||||
private double pushfactor = defaultpushfactor;
|
||||
private double damage = defaultdamage;
|
||||
private double pushfactor = PUSH_FACTOR;
|
||||
private double speed = SPEED;
|
||||
private double range = RANGE;
|
||||
private double maxfactor = MAX_FACTOR;
|
||||
private double affectingradius = AFFECTING_RADIUS;
|
||||
private int arc = ARC;
|
||||
private long maxchargetime = MAX_CHARGE_TIME;
|
||||
private int id;
|
||||
private ConcurrentHashMap<Vector, Location> elements = new ConcurrentHashMap<Vector, Location>();
|
||||
private ArrayList<Entity> affectedentities = new ArrayList<Entity>();
|
||||
|
@ -177,7 +183,7 @@ public class AirSwipe {
|
|||
} else {
|
||||
Methods.removeSpouts(location, player);
|
||||
|
||||
double radius = FireBlast.affectingradius;
|
||||
double radius = FireBlast.AFFECTING_RADIUS;
|
||||
Player source = player;
|
||||
if (EarthBlast.annihilateBlasts(location, radius, source)
|
||||
|| WaterManipulation.annihilateBlasts(location,radius, source)
|
||||
|
@ -303,4 +309,71 @@ public class AirSwipe {
|
|||
return removed;
|
||||
}
|
||||
|
||||
public Player getPlayer() {
|
||||
return player;
|
||||
}
|
||||
|
||||
public double getDamage() {
|
||||
return damage;
|
||||
}
|
||||
|
||||
public void setDamage(double damage) {
|
||||
this.damage = damage;
|
||||
}
|
||||
|
||||
public double getSpeed() {
|
||||
return speed;
|
||||
}
|
||||
|
||||
public void setSpeed(double speed) {
|
||||
this.speed = speed;
|
||||
}
|
||||
|
||||
public double getRange() {
|
||||
return range;
|
||||
}
|
||||
|
||||
public void setRange(double range) {
|
||||
this.range = range;
|
||||
}
|
||||
|
||||
public double getMaxfactor() {
|
||||
return maxfactor;
|
||||
}
|
||||
|
||||
public void setMaxfactor(double maxfactor) {
|
||||
this.maxfactor = maxfactor;
|
||||
}
|
||||
|
||||
public double getAffectingradius() {
|
||||
return affectingradius;
|
||||
}
|
||||
|
||||
public void setAffectingradius(double affectingradius) {
|
||||
this.affectingradius = affectingradius;
|
||||
}
|
||||
|
||||
public int getArc() {
|
||||
return arc;
|
||||
}
|
||||
|
||||
public void setArc(int arc) {
|
||||
this.arc = arc;
|
||||
}
|
||||
|
||||
public long getMaxchargetime() {
|
||||
return maxchargetime;
|
||||
}
|
||||
|
||||
public void setMaxchargetime(long maxchargetime) {
|
||||
this.maxchargetime = maxchargetime;
|
||||
}
|
||||
|
||||
public double getPushfactor() {
|
||||
return pushfactor;
|
||||
}
|
||||
|
||||
public void setPushfactor(double pushfactor) {
|
||||
this.pushfactor = pushfactor;
|
||||
}
|
||||
}
|
|
@ -21,17 +21,13 @@ public class Tornado {
|
|||
|
||||
public static ConcurrentHashMap<Integer, Tornado> instances = new ConcurrentHashMap<Integer, Tornado>();
|
||||
|
||||
private static double maxheight = config.getDouble("Abilities.Air.Tornado.Height");
|
||||
private static double PCpushfactor = config.getDouble("Abilities.Air.Tornado.PlayerPushFactor");
|
||||
private static double maxradius = config.getDouble("Abilities.Air.Tornado.Radius");
|
||||
private static double range = config.getDouble("Abilities.Air.Tornado.Range");
|
||||
private static double NPCpushfactor = config.getDouble("Abilities.Air.Tornado.MobPushFactor");
|
||||
private static int numberOfStreams = (int) (.3 * (double) maxheight);
|
||||
private static double MAX_HEIGHT = config.getDouble("Abilities.Air.Tornado.Height");
|
||||
private static double PLAYER_PUSH_FACTOR = config.getDouble("Abilities.Air.Tornado.PlayerPushFactor");
|
||||
private static double MAX_RADIUS = config.getDouble("Abilities.Air.Tornado.Radius");
|
||||
private static double RANGE = config.getDouble("Abilities.Air.Tornado.Range");
|
||||
private static double NPC_PUSH_FACTOR = config.getDouble("Abilities.Air.Tornado.MobPushFactor");
|
||||
private static int numberOfStreams = (int) (.3 * (double) MAX_HEIGHT);
|
||||
// private static double speed = .75;
|
||||
|
||||
private double height = 2;
|
||||
private double radius = height / maxheight * maxradius;
|
||||
|
||||
// private static double speedfactor = 1000 * speed
|
||||
// * (Bending.time_step / 1000.);
|
||||
private static double speedfactor = 1;
|
||||
|
@ -39,7 +35,13 @@ public class Tornado {
|
|||
private ConcurrentHashMap<Integer, Integer> angles = new ConcurrentHashMap<Integer, Integer>();
|
||||
private Location origin;
|
||||
private Player player;
|
||||
|
||||
private double maxheight = MAX_HEIGHT;
|
||||
private double PCpushfactor = PLAYER_PUSH_FACTOR;
|
||||
private double maxradius = MAX_RADIUS;
|
||||
private double range = RANGE;
|
||||
private double NPCpushfactor = NPC_PUSH_FACTOR;
|
||||
private double height = 2;
|
||||
private double radius = height / maxheight * maxradius;
|
||||
// private boolean canfly;
|
||||
|
||||
public Tornado(Player player) {
|
||||
|
@ -212,4 +214,48 @@ public class Tornado {
|
|||
return players;
|
||||
}
|
||||
|
||||
public Player getPlayer() {
|
||||
return player;
|
||||
}
|
||||
|
||||
public double getMaxheight() {
|
||||
return maxheight;
|
||||
}
|
||||
|
||||
public void setMaxheight(double maxheight) {
|
||||
this.maxheight = maxheight;
|
||||
}
|
||||
|
||||
public double getPCpushfactor() {
|
||||
return PCpushfactor;
|
||||
}
|
||||
|
||||
public void setPCpushfactor(double pCpushfactor) {
|
||||
PCpushfactor = pCpushfactor;
|
||||
}
|
||||
|
||||
public double getMaxradius() {
|
||||
return maxradius;
|
||||
}
|
||||
|
||||
public void setMaxradius(double maxradius) {
|
||||
this.maxradius = maxradius;
|
||||
}
|
||||
|
||||
public double getRange() {
|
||||
return range;
|
||||
}
|
||||
|
||||
public void setRange(double range) {
|
||||
this.range = range;
|
||||
}
|
||||
|
||||
public double getNPCpushfactor() {
|
||||
return NPCpushfactor;
|
||||
}
|
||||
|
||||
public void setNPCpushfactor(double nPCpushfactor) {
|
||||
NPCpushfactor = nPCpushfactor;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue