mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-06-30 09:49:31 +00:00
Added get and set Methods to Fire abilities
This commit is contained in:
parent
ce49625c2b
commit
ef2f4d4224
|
@ -15,7 +15,7 @@ public class Cook {
|
|||
|
||||
private static ConcurrentHashMap<Player, Cook> instances = new ConcurrentHashMap<Player, Cook>();
|
||||
|
||||
private static final long cooktime = 2000;
|
||||
private static final long COOK_TIME = 2000;
|
||||
private static final Material[] cookables = { Material.RAW_BEEF,
|
||||
Material.RAW_CHICKEN, Material.RAW_FISH, Material.PORK,
|
||||
Material.POTATO_ITEM };
|
||||
|
@ -23,6 +23,7 @@ public class Cook {
|
|||
private Player player;
|
||||
private ItemStack items;
|
||||
private long time;
|
||||
private long cooktime = COOK_TIME;
|
||||
|
||||
public Cook(Player player) {
|
||||
this.player = player;
|
||||
|
@ -135,4 +136,24 @@ public class Cook {
|
|||
instances.clear();
|
||||
}
|
||||
|
||||
public Player getPlayer() {
|
||||
return player;
|
||||
}
|
||||
|
||||
public long getTime() {
|
||||
return time;
|
||||
}
|
||||
|
||||
public void setTime(long time) {
|
||||
this.time = time;
|
||||
}
|
||||
|
||||
public long getCooktime() {
|
||||
return cooktime;
|
||||
}
|
||||
|
||||
public void setCooktime(long cooktime) {
|
||||
this.cooktime = cooktime;
|
||||
}
|
||||
|
||||
}
|
|
@ -28,15 +28,15 @@ public class FireBlast {
|
|||
Random rand = new Random();
|
||||
|
||||
public static ConcurrentHashMap<Integer, FireBlast> instances = new ConcurrentHashMap<Integer, FireBlast>();
|
||||
private static double speed = ProjectKorra.plugin.getConfig().getDouble("Abilities.Fire.FireBlast.Speed");
|
||||
private static double pushfactor = ProjectKorra.plugin.getConfig().getDouble("Abilities.Fire.FireBlast.Push");
|
||||
private static double SPEED = ProjectKorra.plugin.getConfig().getDouble("Abilities.Fire.FireBlast.Speed");
|
||||
private static double PUSH_FACTOR = ProjectKorra.plugin.getConfig().getDouble("Abilities.Fire.FireBlast.Push");
|
||||
private static double RANGE = ProjectKorra.plugin.getConfig().getDouble("Abilities.Fire.FireBlast.Range");
|
||||
static boolean dissipate = ProjectKorra.plugin.getConfig().getBoolean("Abilities.Fire.FireBlast.Dissipate");
|
||||
private static int DAMAGE = ProjectKorra.plugin.getConfig().getInt("Abilities.Fire.FireBlast.Damage");
|
||||
|
||||
long cooldown = ProjectKorra.plugin.getConfig().getLong("Abilities.Fire.FireBlast.Cooldown");
|
||||
|
||||
public static double affectingradius = 2;
|
||||
public static double AFFECTING_RADIUS = 2;
|
||||
// public static long interval = 2000;
|
||||
public static byte full = 0x0;
|
||||
private static int ID = Integer.MIN_VALUE;
|
||||
|
@ -53,6 +53,9 @@ public class FireBlast {
|
|||
private int ticks = 0;
|
||||
private double range = RANGE;
|
||||
private double damage = DAMAGE;
|
||||
private double speed = SPEED;
|
||||
private double pushfactor = PUSH_FACTOR;
|
||||
private double affectingradius = AFFECTING_RADIUS;
|
||||
private boolean showParticles = true;
|
||||
|
||||
public FireBlast(Player player) {
|
||||
|
@ -137,7 +140,7 @@ public class FireBlast {
|
|||
|
||||
Methods.removeSpouts(location, player);
|
||||
|
||||
double radius = FireBlast.affectingradius;
|
||||
double radius = affectingradius;
|
||||
Player source = player;
|
||||
if (EarthBlast.annihilateBlasts(location, radius, source)
|
||||
|| WaterManipulation.annihilateBlasts(location, radius, source)
|
||||
|
@ -288,4 +291,50 @@ public class FireBlast {
|
|||
+ "fireball that explodes on contact.";
|
||||
}
|
||||
|
||||
public long getCooldown() {
|
||||
return cooldown;
|
||||
}
|
||||
|
||||
public void setCooldown(long cooldown) {
|
||||
this.cooldown = cooldown;
|
||||
if(player != null)
|
||||
Methods.getBendingPlayer(player.getName()).addCooldown("FireBlast", cooldown);
|
||||
}
|
||||
|
||||
public Player getPlayer() {
|
||||
return player;
|
||||
}
|
||||
|
||||
public double getSpeed() {
|
||||
return speed;
|
||||
}
|
||||
|
||||
public void setSpeed(double speed) {
|
||||
this.speed = speed;
|
||||
}
|
||||
|
||||
public double getPushfactor() {
|
||||
return pushfactor;
|
||||
}
|
||||
|
||||
public void setPushfactor(double pushfactor) {
|
||||
this.pushfactor = pushfactor;
|
||||
}
|
||||
|
||||
public double getAffectingradius() {
|
||||
return affectingradius;
|
||||
}
|
||||
|
||||
public void setAffectingradius(double affectingradius) {
|
||||
this.affectingradius = affectingradius;
|
||||
}
|
||||
|
||||
public double getRange() {
|
||||
return range;
|
||||
}
|
||||
|
||||
public double getDamage() {
|
||||
return damage;
|
||||
}
|
||||
|
||||
}
|
|
@ -177,4 +177,32 @@ public class FireBurst {
|
|||
instances.clear();
|
||||
|
||||
}
|
||||
|
||||
public Player getPlayer() {
|
||||
return player;
|
||||
}
|
||||
|
||||
public int getDamage() {
|
||||
return damage;
|
||||
}
|
||||
|
||||
public void setDamage(int damage) {
|
||||
this.damage = damage;
|
||||
}
|
||||
|
||||
public long getChargetime() {
|
||||
return chargetime;
|
||||
}
|
||||
|
||||
public void setChargetime(long chargetime) {
|
||||
this.chargetime = chargetime;
|
||||
}
|
||||
|
||||
public long getRange() {
|
||||
return range;
|
||||
}
|
||||
|
||||
public void setRange(long range) {
|
||||
this.range = range;
|
||||
}
|
||||
}
|
|
@ -106,4 +106,24 @@ public class FireJet {
|
|||
return players;
|
||||
}
|
||||
|
||||
public Player getPlayer() {
|
||||
return player;
|
||||
}
|
||||
|
||||
public long getDuration() {
|
||||
return duration;
|
||||
}
|
||||
|
||||
public void setDuration(long duration) {
|
||||
this.duration = duration;
|
||||
}
|
||||
|
||||
public double getFactor() {
|
||||
return factor;
|
||||
}
|
||||
|
||||
public void setFactor(double factor) {
|
||||
this.factor = factor;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -24,15 +24,18 @@ public class FireShield {
|
|||
private static ConcurrentHashMap<Player, FireShield> instances = new ConcurrentHashMap<Player, FireShield>();
|
||||
|
||||
private static long interval = 100;
|
||||
private static long duration = ProjectKorra.plugin.getConfig().getLong("Abilities.Fire.FireShield.Duration");
|
||||
private static double radius = ProjectKorra.plugin.getConfig().getDouble("Abilities.Fire.FireShield.Radius");
|
||||
private static double discradius = ProjectKorra.plugin.getConfig().getDouble("Abilities.Fire.FireShield.DiscRadius");
|
||||
private static long DURATION = ProjectKorra.plugin.getConfig().getLong("Abilities.Fire.FireShield.Duration");
|
||||
private static double RADIUS = ProjectKorra.plugin.getConfig().getDouble("Abilities.Fire.FireShield.Radius");
|
||||
private static double DISC_RADIUS = ProjectKorra.plugin.getConfig().getDouble("Abilities.Fire.FireShield.DiscRadius");
|
||||
private static boolean ignite = true;
|
||||
|
||||
private Player player;
|
||||
private long time;
|
||||
private long starttime;
|
||||
private boolean shield = false;
|
||||
private long duration = DURATION;
|
||||
private double radius = RADIUS;
|
||||
private double discradius = DISC_RADIUS;
|
||||
|
||||
public FireShield(Player player) {
|
||||
this(player, false);
|
||||
|
@ -183,12 +186,12 @@ public class FireShield {
|
|||
Location playerLoc = fshield.player.getLocation();
|
||||
|
||||
if(fshield.shield){
|
||||
if(playerLoc.distance(loc) <= FireShield.radius)
|
||||
if(playerLoc.distance(loc) <= fshield.radius)
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
Location tempLoc = playerLoc.clone().add(playerLoc.multiply(radius));
|
||||
if(tempLoc.distance(loc) <= FireShield.discradius)
|
||||
Location tempLoc = playerLoc.clone().add(playerLoc.multiply(fshield.discradius));
|
||||
if(tempLoc.distance(loc) <= fshield.discradius)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -212,4 +215,40 @@ public class FireShield {
|
|||
public static void removeAll() {
|
||||
instances.clear();
|
||||
}
|
||||
|
||||
public Player getPlayer() {
|
||||
return player;
|
||||
}
|
||||
|
||||
public boolean isShield() {
|
||||
return shield;
|
||||
}
|
||||
|
||||
public void setShield(boolean shield) {
|
||||
this.shield = shield;
|
||||
}
|
||||
|
||||
public long getDuration() {
|
||||
return duration;
|
||||
}
|
||||
|
||||
public void setDuration(long duration) {
|
||||
this.duration = duration;
|
||||
}
|
||||
|
||||
public double getRadius() {
|
||||
return radius;
|
||||
}
|
||||
|
||||
public void setRadius(double radius) {
|
||||
this.radius = radius;
|
||||
}
|
||||
|
||||
public double getDiscradius() {
|
||||
return discradius;
|
||||
}
|
||||
|
||||
public void setDiscradius(double discradius) {
|
||||
this.discradius = discradius;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -201,4 +201,16 @@ public class FireStream {
|
|||
|
||||
}
|
||||
|
||||
public Player getPlayer() {
|
||||
return player;
|
||||
}
|
||||
|
||||
public double getRange() {
|
||||
return range;
|
||||
}
|
||||
|
||||
public void setRange(double range) {
|
||||
this.range = range;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -35,6 +35,7 @@ public class Fireball {
|
|||
private double maxdamage = MAX_DAMAGE;
|
||||
private double range = RANGE;
|
||||
private double explosionradius = DAMAGE_RADIUS;
|
||||
private double power = POWER;
|
||||
private double innerradius = explosionradius / 2;
|
||||
private long starttime;
|
||||
private long time;
|
||||
|
@ -211,7 +212,7 @@ public class Fireball {
|
|||
if (explode) {
|
||||
explosion = player.getWorld().spawn(location, TNTPrimed.class);
|
||||
explosion.setFuseTicks(0);
|
||||
float yield = (float) POWER;
|
||||
float yield = (float) power;
|
||||
if (!AvatarState.isAvatarState(player)) {
|
||||
if (Methods.isDay(player.getWorld())) {
|
||||
Methods.getFirebendingDayAugment(yield, player.getWorld());
|
||||
|
@ -246,7 +247,7 @@ public class Fireball {
|
|||
}
|
||||
|
||||
private void ignite(Location location) {
|
||||
for (Block block : Methods.getBlocksAroundPoint(location, FireBlast.affectingradius)) {
|
||||
for (Block block : Methods.getBlocksAroundPoint(location, FireBlast.AFFECTING_RADIUS)) {
|
||||
if (FireStream.isIgnitable(player, block)) {
|
||||
block.setType(Material.FIRE);
|
||||
if (FireBlast.dissipate) {
|
||||
|
@ -304,4 +305,52 @@ public class Fireball {
|
|||
return broke;
|
||||
|
||||
}
|
||||
|
||||
public double getMaxdamage() {
|
||||
return maxdamage;
|
||||
}
|
||||
|
||||
public void setMaxdamage(double maxdamage) {
|
||||
this.maxdamage = maxdamage;
|
||||
}
|
||||
|
||||
public double getRange() {
|
||||
return range;
|
||||
}
|
||||
|
||||
public void setRange(double range) {
|
||||
this.range = range;
|
||||
}
|
||||
|
||||
public double getExplosionradius() {
|
||||
return explosionradius;
|
||||
}
|
||||
|
||||
public void setExplosionradius(double explosionradius) {
|
||||
this.explosionradius = explosionradius;
|
||||
}
|
||||
|
||||
public double getPower() {
|
||||
return power;
|
||||
}
|
||||
|
||||
public void setPower(double power) {
|
||||
this.power = power;
|
||||
}
|
||||
|
||||
public double getInnerradius() {
|
||||
return innerradius;
|
||||
}
|
||||
|
||||
public void setInnerradius(double innerradius) {
|
||||
this.innerradius = innerradius;
|
||||
}
|
||||
|
||||
public long getChargetime() {
|
||||
return chargetime;
|
||||
}
|
||||
|
||||
public void setChargetime(long chargetime) {
|
||||
this.chargetime = chargetime;
|
||||
}
|
||||
}
|
|
@ -193,7 +193,6 @@ public class Lightning {
|
|||
}
|
||||
return !Methods.isRegionProtectedFromBuild(player, "Lightning",
|
||||
block.getLocation());
|
||||
|
||||
}
|
||||
|
||||
public void electrocute(LivingEntity lent) {
|
||||
|
@ -467,4 +466,126 @@ public class Lightning {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Player getPlayer() {
|
||||
return player;
|
||||
}
|
||||
|
||||
public void setPlayer(Player player) {
|
||||
this.player = player;
|
||||
}
|
||||
|
||||
public double getRange() {
|
||||
return range;
|
||||
}
|
||||
|
||||
public void setRange(double range) {
|
||||
this.range = range;
|
||||
}
|
||||
|
||||
public double getChargeTime() {
|
||||
return chargeTime;
|
||||
}
|
||||
|
||||
public void setChargeTime(double chargeTime) {
|
||||
this.chargeTime = chargeTime;
|
||||
}
|
||||
|
||||
public double getCooldown() {
|
||||
return cooldown;
|
||||
}
|
||||
|
||||
public void setCooldown(double cooldown) {
|
||||
this.cooldown = cooldown;
|
||||
if(player != null)
|
||||
bplayer.addCooldown("Lightning", (long) cooldown);
|
||||
}
|
||||
|
||||
public double getSubArcChance() {
|
||||
return subArcChance;
|
||||
}
|
||||
|
||||
public void setSubArcChance(double subArcChance) {
|
||||
this.subArcChance = subArcChance;
|
||||
}
|
||||
|
||||
public double getDamage() {
|
||||
return damage;
|
||||
}
|
||||
|
||||
public void setDamage(double damage) {
|
||||
this.damage = damage;
|
||||
}
|
||||
|
||||
public double getChainArcs() {
|
||||
return chainArcs;
|
||||
}
|
||||
|
||||
public void setChainArcs(double chainArcs) {
|
||||
this.chainArcs = chainArcs;
|
||||
}
|
||||
|
||||
public double getChainRange() {
|
||||
return chainRange;
|
||||
}
|
||||
|
||||
public void setChainRange(double chainRange) {
|
||||
this.chainRange = chainRange;
|
||||
}
|
||||
|
||||
public double getWaterRange() {
|
||||
return waterRange;
|
||||
}
|
||||
|
||||
public void setWaterRange(double waterRange) {
|
||||
this.waterRange = waterRange;
|
||||
}
|
||||
|
||||
public double getChainArcChance() {
|
||||
return chainArcChance;
|
||||
}
|
||||
|
||||
public void setChainArcChance(double chainArcChance) {
|
||||
this.chainArcChance = chainArcChance;
|
||||
}
|
||||
|
||||
public double getStunChance() {
|
||||
return stunChance;
|
||||
}
|
||||
|
||||
public void setStunChance(double stunChance) {
|
||||
this.stunChance = stunChance;
|
||||
}
|
||||
|
||||
public double getStunDuration() {
|
||||
return stunDuration;
|
||||
}
|
||||
|
||||
public void setStunDuration(double stunDuration) {
|
||||
this.stunDuration = stunDuration;
|
||||
}
|
||||
|
||||
public boolean isCharged() {
|
||||
return charged;
|
||||
}
|
||||
|
||||
public void setCharged(boolean charged) {
|
||||
this.charged = charged;
|
||||
}
|
||||
|
||||
public boolean isHitWater() {
|
||||
return hitWater;
|
||||
}
|
||||
|
||||
public void setHitWater(boolean hitWater) {
|
||||
this.hitWater = hitWater;
|
||||
}
|
||||
|
||||
public boolean isHitIce() {
|
||||
return hitIce;
|
||||
}
|
||||
|
||||
public void setHitIce(boolean hitIce) {
|
||||
this.hitIce = hitIce;
|
||||
}
|
||||
}
|
|
@ -26,20 +26,27 @@ public class WallOfFire {
|
|||
private static double maxangle = 50;
|
||||
|
||||
public static FileConfiguration config = ProjectKorra.plugin.getConfig();
|
||||
private static int range = config.getInt("Abilities.Fire.WallOfFire.Range");
|
||||
private int height = config.getInt("Abilities.Fire.WallOfFire.Height");
|
||||
private int width = config.getInt("Abilities.Fire.WallOfFire.Width");
|
||||
private long duration = config.getLong("Abilities.Fire.WallOfFire.Duration");
|
||||
private int damage = config.getInt("Abilities.Fire.WallOfFire.Damage");
|
||||
private static int RANGE = config.getInt("Abilities.Fire.WallOfFire.Range");
|
||||
private int HEIGHT = config.getInt("Abilities.Fire.WallOfFire.Height");
|
||||
private int WIDTH = config.getInt("Abilities.Fire.WallOfFire.Width");
|
||||
private long DURATION = config.getLong("Abilities.Fire.WallOfFire.Duration");
|
||||
private int DAMAGE = config.getInt("Abilities.Fire.WallOfFire.Damage");
|
||||
private static long interval = 250;
|
||||
private static long cooldown = config.getLong("Abilities.Fire.WallOfFire.Cooldown");
|
||||
private static long COOLDOWN = config.getLong("Abilities.Fire.WallOfFire.Cooldown");
|
||||
public static ConcurrentHashMap<Player, WallOfFire> instances = new ConcurrentHashMap<Player, WallOfFire>();
|
||||
private static long damageinterval = config.getLong("Abilities.Fire.WallOfFire.Interval");
|
||||
private static long DAMAGE_INTERVAL = config.getLong("Abilities.Fire.WallOfFire.Interval");
|
||||
|
||||
private Location origin;
|
||||
private long time, starttime;
|
||||
private boolean active = true;
|
||||
private int damagetick = 0, intervaltick = 0;
|
||||
private int range = RANGE;
|
||||
private int height = HEIGHT;
|
||||
private int width = WIDTH;
|
||||
private long duration = DURATION;
|
||||
private int damage = DAMAGE;
|
||||
private long cooldown = COOLDOWN;
|
||||
private long damageinterval = DAMAGE_INTERVAL;
|
||||
private List<Block> blocks = new ArrayList<Block>();
|
||||
|
||||
public WallOfFire(Player player) {
|
||||
|
@ -192,4 +199,66 @@ public class WallOfFire {
|
|||
instances.get(player).progress();
|
||||
}
|
||||
}
|
||||
|
||||
public Player getPlayer() {
|
||||
return player;
|
||||
}
|
||||
|
||||
public int getRange() {
|
||||
return range;
|
||||
}
|
||||
|
||||
public void setRange(int range) {
|
||||
this.range = range;
|
||||
}
|
||||
|
||||
public int getHeight() {
|
||||
return height;
|
||||
}
|
||||
|
||||
public void setHeight(int height) {
|
||||
this.height = height;
|
||||
}
|
||||
|
||||
public int getWidth() {
|
||||
return width;
|
||||
}
|
||||
|
||||
public void setWidth(int width) {
|
||||
this.width = width;
|
||||
}
|
||||
|
||||
public long getDuration() {
|
||||
return duration;
|
||||
}
|
||||
|
||||
public void setDuration(long duration) {
|
||||
this.duration = duration;
|
||||
}
|
||||
|
||||
public int getDamage() {
|
||||
return damage;
|
||||
}
|
||||
|
||||
public void setDamage(int damage) {
|
||||
this.damage = damage;
|
||||
}
|
||||
|
||||
public long getCooldown() {
|
||||
return cooldown;
|
||||
}
|
||||
|
||||
public void setCooldown(long cooldown) {
|
||||
this.cooldown = cooldown;
|
||||
if(player != null)
|
||||
Methods.getBendingPlayer(player.getName()).addCooldown("WallOfFire", cooldown);
|
||||
}
|
||||
|
||||
public long getDamageinterval() {
|
||||
return damageinterval;
|
||||
}
|
||||
|
||||
public void setDamageinterval(long damageinterval) {
|
||||
this.damageinterval = damageinterval;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue