mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-12 03:59:06 +00:00
commit
36307fa88a
45 changed files with 95 additions and 8 deletions
|
@ -7,6 +7,7 @@ import com.projectkorra.ProjectKorra.Ability.StockAbilities;
|
|||
import com.projectkorra.ProjectKorra.Objects.Preset;
|
||||
import com.projectkorra.ProjectKorra.Utilities.GrapplingHookAPI;
|
||||
import com.projectkorra.rpg.RPGMethods;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.Command;
|
||||
|
@ -81,6 +82,7 @@ public class Commands {
|
|||
CommandExecutor exe;
|
||||
|
||||
exe = new CommandExecutor() {
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean onCommand(CommandSender s, Command c, String label, String[] args) {
|
||||
for(int i = 0; i < args.length; i++){
|
||||
|
|
|
@ -34,11 +34,13 @@ import com.projectkorra.rpg.RPGMethods;
|
|||
import com.projectkorra.rpg.WorldEvents;
|
||||
import com.sk89q.worldguard.bukkit.WorldGuardPlugin;
|
||||
import com.sk89q.worldguard.protection.flags.DefaultFlag;
|
||||
|
||||
import fr.neatmonster.nocheatplus.checks.CheckType;
|
||||
import fr.neatmonster.nocheatplus.hooks.NCPExemptionManager;
|
||||
import me.ryanhamshire.GriefPrevention.GriefPrevention;
|
||||
import net.sacredlabyrinth.Phaed.PreciousStones.FieldFlag;
|
||||
import net.sacredlabyrinth.Phaed.PreciousStones.PreciousStones;
|
||||
|
||||
import org.bukkit.*;
|
||||
import org.bukkit.World.Environment;
|
||||
import org.bukkit.block.Block;
|
||||
|
@ -276,6 +278,7 @@ public class Methods {
|
|||
return true;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public static boolean canBendPassive(String player, Element element) {
|
||||
BendingPlayer bPlayer = getBendingPlayer(player);
|
||||
Player p = Bukkit.getPlayer(player);
|
||||
|
@ -436,6 +439,7 @@ public class Methods {
|
|||
* @param entity The entity that is receiving the damage
|
||||
* @param damage The amount of damage to deal
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public static void damageEntity(Player player, Entity entity, double damage) {
|
||||
if (entity instanceof LivingEntity) {
|
||||
if (entity instanceof Player) {
|
||||
|
@ -724,6 +728,7 @@ public class Methods {
|
|||
* @param breakitem Unused
|
||||
* @return The item drops fromt the specified block
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public static Collection<ItemStack> getDrops(Block block, Material type, byte data, ItemStack breakitem) {
|
||||
BlockState tempstate = block.getState();
|
||||
block.setType(type);
|
||||
|
@ -754,6 +759,7 @@ public class Methods {
|
|||
return ChatColor.valueOf(plugin.getConfig().getString("Properties.Chat.Colors.Earth"));
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public static Block getEarthSourceBlock(Player player, double range) {
|
||||
Block testblock = player.getTargetBlock(getTransparentEarthbending(), (int) range);
|
||||
if (isEarthbendable(player, testblock))
|
||||
|
@ -846,6 +852,7 @@ public class Methods {
|
|||
return ChatColor.valueOf(plugin.getConfig().getString("Properties.Chat.Colors.Fire"));
|
||||
}
|
||||
|
||||
@SuppressWarnings("incomplete-switch")
|
||||
public static int getIntCardinalDirection(Vector vector) {
|
||||
BlockFace face = getCardinalDirection(vector);
|
||||
|
||||
|
@ -880,6 +887,7 @@ public class Methods {
|
|||
return ChatColor.valueOf(plugin.getConfig().getString("Properties.Chat.Colors.Metalbending"));
|
||||
}
|
||||
|
||||
@SuppressWarnings("incomplete-switch")
|
||||
public static ChatColor getSubBendingColor(Element element)
|
||||
{
|
||||
switch(element)
|
||||
|
@ -913,6 +921,7 @@ public class Methods {
|
|||
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public static Entity getTargetedEntity(Player player, double range, List<Entity> avoid) {
|
||||
double longestr = range + 1;
|
||||
Entity target = null;
|
||||
|
@ -1002,6 +1011,7 @@ public class Methods {
|
|||
return blocks;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public static Location getTargetedLocation(Player player, double originselectrange, Integer... nonOpaque2) {
|
||||
Location origin = player.getEyeLocation();
|
||||
Vector direction = origin.getDirection();
|
||||
|
@ -1066,6 +1076,7 @@ public class Methods {
|
|||
return ChatColor.valueOf(plugin.getConfig().getString("Properties.Chat.Colors.Water"));
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public static Block getWaterSourceBlock(Player player, double range,
|
||||
boolean plantbending) {
|
||||
Location location = player.getEyeLocation();
|
||||
|
@ -1093,6 +1104,7 @@ public class Methods {
|
|||
return null;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public static Block getLavaSourceBlock(Player player, double range) {
|
||||
Location location = player.getEyeLocation();
|
||||
Vector vector = location.getDirection().clone().normalize();
|
||||
|
@ -1158,6 +1170,7 @@ public class Methods {
|
|||
return adjacent;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public static boolean isAdjacentToThreeOrMoreSources(Block block) {
|
||||
if (TempBlock.isTempBlock(block))
|
||||
return false;
|
||||
|
@ -1363,6 +1376,7 @@ public class Methods {
|
|||
return false;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public static boolean isObstructed(Location location1, Location location2) {
|
||||
Vector loc1 = location1.toVector();
|
||||
Vector loc2 = location2.toVector();
|
||||
|
@ -1386,6 +1400,7 @@ public class Methods {
|
|||
return false;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public static boolean isPlant(Block block) {
|
||||
if (Arrays.asList(plantIds).contains(block.getTypeId())) return true;
|
||||
return false;
|
||||
|
@ -1592,6 +1607,7 @@ public class Methods {
|
|||
return false;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public static boolean isSolid(Block block) {
|
||||
if (Arrays.asList(nonOpaque).contains(block.getTypeId())) return false;
|
||||
return true;
|
||||
|
@ -1601,6 +1617,7 @@ public class Methods {
|
|||
return isTransparentToEarthbending(player, "RaiseEarth", block);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public static boolean isTransparentToEarthbending(Player player,
|
||||
String ability, Block block) {
|
||||
if (!Arrays.asList(transparentToEarthbending).contains(block.getTypeId()))
|
||||
|
@ -1625,6 +1642,7 @@ public class Methods {
|
|||
return AbilityModuleManager.waterbendingabilities.contains(ability);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public static boolean isWaterbendable(Block block, Player player) {
|
||||
byte full = 0x0;
|
||||
if (TempBlock.isTempBlock(block)) return false;
|
||||
|
@ -1635,6 +1653,7 @@ public class Methods {
|
|||
return false;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public static boolean isLavabendable(Block block, Player player) {
|
||||
byte full = 0x0;
|
||||
if (TempBlock.isTempBlock(block)){
|
||||
|
@ -1820,6 +1839,7 @@ public class Methods {
|
|||
moveEarth(player, block, direction, chainlength, throwplayer);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public static void moveEarthBlock(Block source, Block target) {
|
||||
byte full = 0x0;
|
||||
Information info;
|
||||
|
@ -1939,6 +1959,7 @@ public class Methods {
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public static void removeBlock(Block block) {
|
||||
if (isAdjacentToThreeOrMoreSources(block)) {
|
||||
block.setType(Material.WATER);
|
||||
|
@ -1994,6 +2015,7 @@ public class Methods {
|
|||
revertAirBlock(i, false);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public static void revertAirBlock(int i, boolean force) {
|
||||
if (!tempair.containsKey(i))
|
||||
return;
|
||||
|
@ -2015,6 +2037,7 @@ public class Methods {
|
|||
tempair.remove(i);
|
||||
}
|
||||
}
|
||||
@SuppressWarnings("deprecation")
|
||||
public static boolean revertBlock(Block block) {
|
||||
byte full = 0x0;
|
||||
if(!ProjectKorra.plugin.getConfig().getBoolean("Properties.Earth.RevertEarthbending")) {
|
||||
|
@ -2189,6 +2212,7 @@ public class Methods {
|
|||
EarthPassive.removeAll();
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public static void setVelocity(Entity entity, Vector velocity){
|
||||
if (entity instanceof TNTPrimed){
|
||||
if (plugin.getConfig().getBoolean("Properties.BendingAffectFallingSand.TNT"))
|
||||
|
|
|
@ -61,6 +61,7 @@ public class Preset {
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static void bindPreset(Player player, String name) {
|
||||
BendingPlayer bPlayer = Methods.getBendingPlayer(player.getName());
|
||||
if (bPlayer == null) return;
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
package com.projectkorra.ProjectKorra;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
//import org.kitteh.tag.AsyncPlayerReceiveNameTagEvent;
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@ public class TempBlock {
|
|||
byte newdata;
|
||||
BlockState state;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public TempBlock(Block block, Material newtype, byte newdata) {
|
||||
this.block = block;
|
||||
this.newdata = newdata;
|
||||
|
@ -48,6 +49,7 @@ public class TempBlock {
|
|||
instances.remove(block);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public static void revertBlock(Block block, Material defaulttype) {
|
||||
if (instances.containsKey(block)) {
|
||||
instances.get(block).revertBlock();
|
||||
|
@ -117,6 +119,7 @@ public class TempBlock {
|
|||
setType(material, newdata);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public void setType(Material material, byte data) {
|
||||
newtype = material;
|
||||
newdata = data;
|
||||
|
|
|
@ -68,6 +68,7 @@ public class AbilityLoader <T extends AbilityLoadable> implements Listener {
|
|||
return plugin.getLogger();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public final List<T> load(Class<? extends AbilityLoadable> classType) {
|
||||
for (File file: files) {
|
||||
try (final JarFile jarFile = new JarFile(file)) {
|
||||
|
|
|
@ -1150,7 +1150,6 @@ public enum ParticleEffect {
|
|||
* @throws IllegalArgumentException If the range is lower than 1
|
||||
* @see #sendTo(Location center, Player player)
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public void sendTo(Location center, double range) throws IllegalArgumentException {
|
||||
if (range < 1) {
|
||||
throw new IllegalArgumentException("The range is lower than 1");
|
||||
|
|
|
@ -3,6 +3,7 @@ package com.projectkorra.ProjectKorra.airbending;
|
|||
import com.projectkorra.ProjectKorra.Ability.AvatarState;
|
||||
import com.projectkorra.ProjectKorra.*;
|
||||
import com.projectkorra.ProjectKorra.Objects.HorizontalVelocityTracker;
|
||||
|
||||
import org.bukkit.Effect;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
|
@ -51,6 +52,7 @@ public class AirBlast {
|
|||
private ArrayList<Block> affectedlevers = new ArrayList<Block>();
|
||||
private ArrayList<Entity> affectedentities = new ArrayList<Entity>();
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private AirBurst source = null;
|
||||
|
||||
// private long time;
|
||||
|
@ -131,6 +133,7 @@ public class AirBlast {
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean progress() {
|
||||
if (player.isDead() || !player.isOnline()) {
|
||||
instances.remove(id);
|
||||
|
|
|
@ -52,6 +52,7 @@ public class AirSuction {
|
|||
|
||||
private double speedfactor;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private ArrayList<Entity> affectedentities = new ArrayList<Entity>();
|
||||
|
||||
public AirSuction(Player player) {
|
||||
|
|
|
@ -170,6 +170,7 @@ public class AirSwipe {
|
|||
return true;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private void advanceSwipe() {
|
||||
affectedentities.clear();
|
||||
for (Vector direction : elements.keySet()) {
|
||||
|
@ -280,6 +281,7 @@ public class AirSwipe {
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private boolean isBlockBreakable(Block block) {
|
||||
Integer id = block.getTypeId();
|
||||
if (Arrays.asList(breakables).contains(id)
|
||||
|
|
|
@ -9,7 +9,6 @@ import java.util.concurrent.ConcurrentHashMap;
|
|||
import org.bukkit.Location;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.potion.PotionEffect;
|
||||
|
@ -20,7 +19,6 @@ import com.projectkorra.ProjectKorra.BendingPlayer;
|
|||
import com.projectkorra.ProjectKorra.Methods;
|
||||
import com.projectkorra.ProjectKorra.ProjectKorra;
|
||||
import com.projectkorra.ProjectKorra.Ability.AvatarState;
|
||||
import com.projectkorra.ProjectKorra.Utilities.ParticleEffect;
|
||||
|
||||
/**
|
||||
* Suffocate
|
||||
|
|
|
@ -44,6 +44,7 @@ public class Tornado {
|
|||
private double radius = height / maxheight * maxradius;
|
||||
// private boolean canfly;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public Tornado(Player player) {
|
||||
this.player = player;
|
||||
// canfly = player.getAllowFlight();
|
||||
|
@ -98,6 +99,7 @@ public class Tornado {
|
|||
return true;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private void rotateTornado() {
|
||||
origin = player.getTargetBlock(null, (int) range).getLocation();
|
||||
|
||||
|
|
|
@ -9,7 +9,6 @@ import org.bukkit.entity.Entity;
|
|||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import com.projectkorra.ProjectKorra.Methods;
|
||||
import com.projectkorra.ProjectKorra.ProjectKorra;
|
||||
|
|
|
@ -23,6 +23,7 @@ public class Collapse {
|
|||
private double radius = defaultradius;
|
||||
private Player player;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public Collapse(Player player) {
|
||||
BendingPlayer bPlayer = Methods.getBendingPlayer(player.getName());
|
||||
if (bPlayer.isOnCooldown("Collapse")) return;
|
||||
|
|
|
@ -39,6 +39,7 @@ public class EarthArmor {
|
|||
private int strength = STRENGTH;
|
||||
public ItemStack[] oldarmor;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public EarthArmor(Player player) {
|
||||
if (instances.containsKey(player)) {
|
||||
return;
|
||||
|
|
|
@ -128,6 +128,7 @@ public class EarthBlast {
|
|||
instances.remove(id);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public void throwEarth() {
|
||||
if (sourceblock != null) {
|
||||
if (sourceblock.getWorld() == player.getWorld()) {
|
||||
|
|
|
@ -72,6 +72,7 @@ public class EarthPassive {
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public static void handleMetalPassives() {
|
||||
for (Player player: Bukkit.getOnlinePlayers()) {
|
||||
if (Methods.canBendPassive(player.getName(), Element.Earth) && Methods.canMetalbend(player)) {
|
||||
|
|
|
@ -6,6 +6,7 @@ import com.projectkorra.ProjectKorra.Methods;
|
|||
import com.projectkorra.ProjectKorra.ProjectKorra;
|
||||
import com.projectkorra.ProjectKorra.TempBlock;
|
||||
import com.projectkorra.ProjectKorra.Utilities.ParticleEffect;
|
||||
|
||||
import org.bukkit.Effect;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
|
@ -288,6 +289,7 @@ public class EarthSmash {
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public void animateLift()
|
||||
{
|
||||
/**
|
||||
|
|
|
@ -32,6 +32,7 @@ public class EarthTunnel {
|
|||
private long interval = INTERVAL;
|
||||
private long time;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public EarthTunnel(Player player) {
|
||||
this.player = player;
|
||||
location = player.getEyeLocation().clone();
|
||||
|
|
|
@ -21,6 +21,7 @@ public class EarthWall {
|
|||
private int height = defaultheight;
|
||||
private int halfwidth = defaulthalfwidth;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public EarthWall(Player player) {
|
||||
BendingPlayer bPlayer = Methods.getBendingPlayer(player.getName());
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@ public class Extraction {
|
|||
private static int doublechance = ProjectKorra.plugin.getConfig().getInt("Abilities.Earth.Extraction.DoubleLootChance");
|
||||
private static int triplechance = ProjectKorra.plugin.getConfig().getInt("Abilities.Earth.Extraction.TripleLootChance");
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public Extraction(Player player) {
|
||||
BendingPlayer bPlayer = Methods.getBendingPlayer(player.getName());
|
||||
if (bPlayer.isOnCooldown("Extraction")) return;
|
||||
|
|
|
@ -24,6 +24,7 @@ public class LavaWall {
|
|||
private static double range = ProjectKorra.plugin.getConfig().getDouble("Abilities.Water.Surge.Wall.Range");
|
||||
private static final double defaultradius = ProjectKorra.plugin.getConfig().getDouble("Abilities.Water.Surge.Wall.Radius");
|
||||
private static final long interval = 30;
|
||||
@SuppressWarnings("unused")
|
||||
private static final byte full = 0x0;
|
||||
Player player;
|
||||
private Location location = null;
|
||||
|
@ -92,6 +93,7 @@ public class LavaWall {
|
|||
instances.remove(player.getEntityId());
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public void moveLava() {
|
||||
if (sourceblock != null) {
|
||||
targetdestination = player.getTargetBlock(Methods.getTransparentEarthbending(), (int) range).getLocation();
|
||||
|
@ -290,6 +292,7 @@ public class LavaWall {
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public static void form(Player player) {
|
||||
if (!instances.containsKey(player.getEntityId())) {
|
||||
new LavaWave(player);
|
||||
|
|
|
@ -25,6 +25,7 @@ public class LavaWave {
|
|||
private static final double defaultfactor = ProjectKorra.plugin.getConfig().getDouble("Abilities.Earth.LavaSurge.HorizontalPush");
|
||||
private static final double upfactor = ProjectKorra.plugin.getConfig().getDouble("Abilities.Earth.LavaSurge.VerticalPush");
|
||||
private static final long interval = 30;
|
||||
@SuppressWarnings("unused")
|
||||
private static final byte full = 0x0;
|
||||
static double defaultrange = 20;
|
||||
Player player;
|
||||
|
@ -92,6 +93,7 @@ public class LavaWave {
|
|||
instances.remove(player.getEntityId());
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public void moveLava() {
|
||||
BendingPlayer bPlayer = Methods.getBendingPlayer(player.getName());
|
||||
if (bPlayer.isOnCooldown("LavaSurge")) return;
|
||||
|
@ -261,6 +263,7 @@ public class LavaWave {
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private void clearWave() {
|
||||
for (Block block : wave.keySet()) {
|
||||
TempBlock.revertBlock(block, Material.AIR);
|
||||
|
|
|
@ -85,6 +85,7 @@ public class Tremorsense {
|
|||
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private void set() {
|
||||
Block standblock = player.getLocation().getBlock()
|
||||
.getRelative(BlockFace.DOWN);
|
||||
|
@ -127,6 +128,7 @@ public class Tremorsense {
|
|||
// }
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private void revert() {
|
||||
if (block != null) {
|
||||
player.sendBlockChange(block.getLocation(), block.getTypeId(),
|
||||
|
|
|
@ -5,6 +5,7 @@ import com.projectkorra.ProjectKorra.BendingPlayer;
|
|||
import com.projectkorra.ProjectKorra.Methods;
|
||||
import com.projectkorra.ProjectKorra.ProjectKorra;
|
||||
import com.projectkorra.ProjectKorra.Utilities.ParticleEffect;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
|
@ -41,7 +42,9 @@ public class Combustion {
|
|||
private double damage;
|
||||
|
||||
public Player player;
|
||||
@SuppressWarnings("unused")
|
||||
private long starttime;
|
||||
@SuppressWarnings("unused")
|
||||
private boolean charged = false;
|
||||
public static ConcurrentHashMap<Player, Combustion> instances = new ConcurrentHashMap<Player, Combustion>();
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ public class Extinguish {
|
|||
|
||||
private static byte full = AirBlast.full;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public Extinguish(Player player) {
|
||||
BendingPlayer bPlayer = Methods.getBendingPlayer(player.getName());
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@ public class HeatMelt {
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private static void heat(Block block) {
|
||||
if (block.getType() == Material.OBSIDIAN) {
|
||||
block.setType(Material.LAVA);
|
||||
|
|
|
@ -40,6 +40,7 @@ public class Illumination {
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private void set() {
|
||||
Block standingblock = player.getLocation().getBlock();
|
||||
Block standblock = standingblock.getRelative(BlockFace.DOWN);
|
||||
|
@ -74,6 +75,7 @@ public class Illumination {
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private void revert() {
|
||||
if (block != null) {
|
||||
blocks.remove(block);
|
||||
|
|
|
@ -198,6 +198,7 @@ public class Lightning {
|
|||
* @param block the block
|
||||
* @return true if the block is transparent
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean isTransparent(Player player, Block block) {
|
||||
if (Arrays.asList(Methods.transparentToEarthbending).contains(block.getTypeId())) {
|
||||
if(Methods.isRegionProtectedFromBuild(player, "Lightning", block.getLocation()))
|
||||
|
|
|
@ -6,6 +6,7 @@ import com.projectkorra.ProjectKorra.Methods;
|
|||
import com.projectkorra.ProjectKorra.Objects.HorizontalVelocityTracker;
|
||||
import com.projectkorra.ProjectKorra.ProjectKorra;
|
||||
import com.projectkorra.ProjectKorra.TempPotionEffect;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.*;
|
||||
import org.bukkit.potion.PotionEffect;
|
||||
|
@ -108,6 +109,7 @@ public class Bloodbending {
|
|||
instances.get(player).launch();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private void launch() {
|
||||
Location location = player.getLocation();
|
||||
for (Entity entity : targetentities.keySet()) {
|
||||
|
|
|
@ -54,6 +54,7 @@ public class FreezeMelt {
|
|||
return false;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
static void freeze(Player player, Block block) {
|
||||
if (Methods.isRegionProtectedFromBuild(player, "PhaseChange", block.getLocation()))
|
||||
return;
|
||||
|
@ -65,6 +66,7 @@ public class FreezeMelt {
|
|||
frozenblocks.put(block, data);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public static void thaw(Block block) {
|
||||
if (frozenblocks.containsKey(block)) {
|
||||
byte data = frozenblocks.get(block);
|
||||
|
@ -131,6 +133,7 @@ public class FreezeMelt {
|
|||
return true;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private static void thawAll() {
|
||||
for (Block block : frozenblocks.keySet()) {
|
||||
if (block.getType() == Material.ICE) {
|
||||
|
|
|
@ -55,6 +55,7 @@ public class IceSpike {
|
|||
private ConcurrentHashMap<Block, Block> affectedblocks = new ConcurrentHashMap<Block, Block>();
|
||||
private List<LivingEntity> damaged = new ArrayList<LivingEntity>();
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public IceSpike(Player player) {
|
||||
BendingPlayer bPlayer = Methods.getBendingPlayer(player.getName());
|
||||
if (bPlayer.isOnCooldown("IceSpike")) return;
|
||||
|
|
|
@ -124,6 +124,7 @@ public class IceSpike2 {
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private static void waterBottle(Player player) {
|
||||
if (WaterReturn.hasWaterBottle(player)) {
|
||||
Location eyeloc = player.getEyeLocation();
|
||||
|
|
|
@ -21,6 +21,7 @@ public class Melt {
|
|||
|
||||
private static final byte full = 0x0;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public Melt(Player player) {
|
||||
if(!Methods.canIcebend(player))
|
||||
return;
|
||||
|
@ -49,6 +50,7 @@ public class Melt {
|
|||
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public static void melt(Player player, Block block) {
|
||||
if (Methods.isRegionProtectedFromBuild(player, "PhaseChange", block.getLocation()))
|
||||
return;
|
||||
|
|
|
@ -85,6 +85,7 @@ public class OctopusForm {
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public static void form(Player player) {
|
||||
if (instances.containsKey(player)) {
|
||||
instances.get(player).form();
|
||||
|
|
|
@ -21,6 +21,7 @@ public class Plantbending {
|
|||
private long time;
|
||||
private int id;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public Plantbending(Block block) {
|
||||
if (regrowtime != 0) {
|
||||
this.block = block;
|
||||
|
@ -37,6 +38,7 @@ public class Plantbending {
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private void revert() {
|
||||
if (block.getType() == Material.AIR) {
|
||||
block.setType(type);
|
||||
|
|
|
@ -4,6 +4,7 @@ import com.projectkorra.ProjectKorra.Ability.AvatarState;
|
|||
import com.projectkorra.ProjectKorra.Methods;
|
||||
import com.projectkorra.ProjectKorra.ProjectKorra;
|
||||
import com.projectkorra.ProjectKorra.TempBlock;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.World;
|
||||
|
@ -255,6 +256,7 @@ public class Torrent {
|
|||
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private boolean launch() {
|
||||
if (launchblocks.isEmpty() && blocks.isEmpty()) {
|
||||
return false;
|
||||
|
@ -453,6 +455,7 @@ public class Torrent {
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public static void create(Player player) {
|
||||
if (instances.containsKey(player))
|
||||
return;
|
||||
|
|
|
@ -66,6 +66,7 @@ public class WaterCombo {
|
|||
private long time;
|
||||
private Location origin;
|
||||
private Location currentLoc;
|
||||
@SuppressWarnings("unused")
|
||||
private Location destination;
|
||||
private Vector direction;
|
||||
private AbilityState state;
|
||||
|
@ -75,6 +76,7 @@ public class WaterCombo {
|
|||
private double shots = 0;
|
||||
private long cooldown = 0;
|
||||
private WaterSourceGrabber waterGrabber;
|
||||
@SuppressWarnings("unused")
|
||||
private ArrayList<Entity> affectedEntities = new ArrayList<Entity>();
|
||||
private ArrayList<BukkitRunnable> tasks = new ArrayList<BukkitRunnable>();
|
||||
private ConcurrentHashMap<Block, TempBlock> affectedBlocks = new ConcurrentHashMap<Block, TempBlock>();
|
||||
|
|
|
@ -205,6 +205,7 @@ public class WaterManipulation {
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private boolean progress() {
|
||||
if (player.isDead() || !player.isOnline()
|
||||
|| !Methods.canBend(player.getName(), "WaterManipulation")) {
|
||||
|
@ -487,6 +488,7 @@ public class WaterManipulation {
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private static void addWater(Block block) {
|
||||
if (!affectedblocks.containsKey(block)) {
|
||||
affectedblocks.put(block, block);
|
||||
|
@ -497,6 +499,7 @@ public class WaterManipulation {
|
|||
block.setData(full);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public static void moveWater(Player player) {
|
||||
BendingPlayer bPlayer = Methods.getBendingPlayer(player.getName());
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ public class WaterPassive {
|
|||
return true;
|
||||
return false;
|
||||
}
|
||||
@SuppressWarnings("deprecation")
|
||||
public static void handlePassive() {
|
||||
for (Player player: Bukkit.getServer().getOnlinePlayers()) {
|
||||
String ability = Methods.getBoundAbility(player);
|
||||
|
|
|
@ -23,6 +23,7 @@ public class WaterSourceGrabber {
|
|||
|
||||
private Player player;
|
||||
private AnimationState state;
|
||||
@SuppressWarnings("unused")
|
||||
private Location origin, currentLoc;
|
||||
private double animSpeed;
|
||||
private Material mat;
|
||||
|
@ -43,6 +44,7 @@ public class WaterSourceGrabber {
|
|||
this(player, origin, 1);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public void progress() {
|
||||
if (state == AnimationState.FAILED || state == AnimationState.FINISHED)
|
||||
return;
|
||||
|
|
|
@ -6,6 +6,7 @@ import com.projectkorra.ProjectKorra.ProjectKorra;
|
|||
import com.projectkorra.ProjectKorra.TempBlock;
|
||||
import com.projectkorra.ProjectKorra.Utilities.ParticleEffect;
|
||||
import com.projectkorra.ProjectKorra.chiblocking.Paralyze;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Server;
|
||||
|
@ -28,6 +29,7 @@ public class WaterSpout {
|
|||
|
||||
// private static final double threshold = .05;
|
||||
// private static final byte half = 0x4;
|
||||
@SuppressWarnings("unused")
|
||||
private static final byte full = 0x0;
|
||||
private Player player;
|
||||
private Block base;
|
||||
|
|
|
@ -47,6 +47,7 @@ public class WaterWall {
|
|||
private double radius = defaultradius;
|
||||
private double range = RANGE;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public WaterWall(Player player) {
|
||||
this.player = player;
|
||||
|
||||
|
@ -177,6 +178,7 @@ public class WaterWall {
|
|||
instances.remove(player.getEntityId());
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public void moveWater() {
|
||||
if (sourceblock != null) {
|
||||
targetdestination = player.getTargetBlock(Methods.getTransparentEarthbending(), (int) range).getLocation();
|
||||
|
@ -453,6 +455,7 @@ public class WaterWall {
|
|||
return instances.get(ID).progress();
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public static void form(Player player) {
|
||||
|
||||
if (!instances.containsKey(player.getEntityId())) {
|
||||
|
|
|
@ -79,6 +79,7 @@ public class WaterWave {
|
|||
this.progress();
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public void progress() {
|
||||
progressCounter++;
|
||||
if (player.isDead() || !player.isOnline()) {
|
||||
|
|
|
@ -29,6 +29,7 @@ public class Wave {
|
|||
private static final double MAX_FREEZE_RADIUS = 7;
|
||||
|
||||
private static final long interval = 30;
|
||||
@SuppressWarnings("unused")
|
||||
private static final byte full = 0x0;
|
||||
static double defaultrange = ProjectKorra.plugin.getConfig().getDouble("Abilities.Water.Surge.Wave.Range");
|
||||
|
||||
|
@ -113,6 +114,7 @@ public class Wave {
|
|||
instances.remove(player.getEntityId());
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public void moveWater() {
|
||||
BendingPlayer bPlayer = Methods.getBendingPlayer(player.getName());
|
||||
|
||||
|
|
Loading…
Reference in a new issue