Merge pull request #1 from ProjectKorra/master

Update
This commit is contained in:
StrangeOne101 2015-08-04 15:12:58 +12:00
commit e0833241f5
18 changed files with 93 additions and 99 deletions

Binary file not shown.

View file

@ -58,7 +58,7 @@ public class BendingPlayer {
}
/**
* Gets the map of {@link BendingPlayers}.
* Gets the map of {@link BendingPlayer}s.
*
* @return {@link #players}
*/

View file

@ -170,7 +170,7 @@ public class GeneralMethods {
*
* @param player The player to bind to
* @param ability The ability name to Bind
* @see {@link #bindAbility(Player, String, int)}
* @see #bindAbility(Player, String, int)
*/
public static void bindAbility(Player player, String ability) {
int slot = player.getInventory().getHeldItemSlot() + 1;
@ -183,7 +183,7 @@ public class GeneralMethods {
* @param player The player to bind to
* @param ability
* @param slot
* @see {@link #bindAbility(Player, String)}
* @see #bindAbility(Player, String)
*/
public static void bindAbility(Player player, String ability, int slot) {
if (MultiAbilityManager.playerAbilities.containsKey(player)) {
@ -663,14 +663,12 @@ public class GeneralMethods {
* Gets the Element color from the Ability name specified.
*
* @param ability The ability name
* <p>
* @return {@link #getChiColor()} <br />
* {@link #getAirColor()} <br />
* {@link #getWaterColor()} <br />
* {@link #getEarthColor()} <br />
* {@link #getFireColor()} <br />
* @return {@link ChiMethods#getChiColor()} <br />
* {@link AirMethods#getAirColor()} <br />
* {@link WaterMethods#getWaterColor()} <br />
* {@link EarthMethods#getEarthColor()} <br />
* {@link FireMethods#getFireColor()} <br />
* else {@link #getAvatarColor()}
* </p>
*/
public static ChatColor getAbilityColor(String ability) {
if (AbilityModuleManager.chiabilities.contains(ability))
@ -704,7 +702,7 @@ public class GeneralMethods {
* Returns the element an ability belongs to.
*
* @param ability
* @return
* @return the element
*/
public static Element getAbilityElement(String ability) {
if (AbilityModuleManager.airbendingabilities.contains(ability))
@ -734,7 +732,7 @@ public class GeneralMethods {
* method tries to get a {@link Player} object and gets the uuid and then
* calls {@link #getBendingPlayer(UUID)}
*
* @param player The name of the Player
* @param playerName The name of the Player
* @return The BendingPlayer object if {@link BendingPlayer#players}
* contains the player name
*
@ -1028,8 +1026,8 @@ public class GeneralMethods {
* Returns the last ability used by a player. Also checks if a combo was
* used.
*
* @param player
* @return
* @param player The player to check
* @return name of last ability used
*/
public static String getLastUsedAbility(Player player, boolean checkCombos) {
List<AbilityInformation> lastUsedAbility = ComboManager.getRecentlyUsedAbilities(player, 1);
@ -1044,12 +1042,12 @@ public class GeneralMethods {
}
/**
* Returns a location with a specified distance away from the left side of a
* Gets a location with a specified distance away from the left side of a
* location.
*
* @param location
* @param distance
* @return
* @param location The origin location
* @param distance The distance to the left
* @return the location of the distance to the left
*/
public static Location getLeftSide(Location location, double distance) {
float angle = location.getYaw() / 60;
@ -1095,9 +1093,9 @@ public class GeneralMethods {
* Returns a location with a specified distance away from the right side of
* a location.
*
* @param location
* @param distance
* @return
* @param location The origin location
* @param distance The distance to the right
* @return the location of the distance to the right
*/
public static Location getRightSide(Location location, double distance) {
float angle = location.getYaw() / 60;

View file

@ -232,14 +232,14 @@ public abstract class CoreAbility implements Ability {
/**
* Convenience method to get instance for current ability class.
*
* @return {@link #getInstance(StockAbility)} for the current ability
* @return instance of the current ability
*/
public CoreAbility getInstance() {
return instances.get(id);
}
/**
* Gets the {@link InstanceType} of the ability.
* Gets the {@link Ability.InstanceType} of the ability.
*
* @return single by default
*/

View file

@ -79,8 +79,8 @@ public class MultiAbilityManager {
* Returns the MultiAbility the player has bound. Returns null if no
* multiability is bound and active.
*
* @param player
* @return
* @param player The player to use
* @return name of multi ability bounded
*/
public static String getBoundMultiAbility(Player player) {
if (playerBoundAbility.containsKey(player))
@ -91,8 +91,8 @@ public class MultiAbilityManager {
/**
* Returns a MultiAbility based on name.
*
* @param multiAbility
* @return
* @param multiAbility Name of the multiability
* @return the multiability object or null
*/
public static MultiAbility getMultiAbility(String multiAbility) {
for (MultiAbility ma : multiAbilityList) {
@ -105,8 +105,8 @@ public class MultiAbilityManager {
/**
* Returns a boolean based on whether a player has a MultiAbility active.
*
* @param player
* @return
* @param player The player to check
* @return true If player has a multiability active
*/
public static boolean hasMultiAbilityBound(Player player) {
if (playerAbilities.containsKey(player))
@ -115,12 +115,12 @@ public class MultiAbilityManager {
}
/**
* MultiAbility equivalent of GeneralMethods.getBoundAbility(). Returns a
* MultiAbility equivalent of {@link GeneralMethods#getBoundAbility(Player)}. Returns a
* boolean based on whether a player has a specific MultiAbility active.
*
* @param player
* @param multiAbility
* @return
* @param player The player to check
* @param multiAbility The multiability name
* @return true If player has the specified multiability active
*/
public static boolean hasMultiAbilityBound(Player player, String multiAbility) {
if (playerAbilities.containsKey(player)) {

View file

@ -112,17 +112,16 @@ public abstract class MultiAbilityModule extends AbilityLoadable implements Clon
}
/**
* Returns the sub abilities of a MultiAbility. e.g. new
* MultiAbilitySub("SubAbility", Element.Fire, SubElement.Lightning);
* Returns the sub abilities of a MultiAbility. e.g. {@code new
* MultiAbilitySub("SubAbility", Element.Fire, SubElement.Lightning);}
*
* @return
* @return arraylist of multiabilitysub
*/
public abstract ArrayList<MultiAbilitySub> getAbilities();
/**
* Void Method called whenever ProjectKorra stops and the ability is
* unloaded.
*
*/
public void stop() {

View file

@ -92,6 +92,10 @@ public class AirScooter extends CoreAbility {
public double getSpeed() {
return speed;
}
public void setSpeed(double value) {
this.speed = value; // Used in PK Items
}
@Override
public StockAbility getStockAbility() {

View file

@ -190,8 +190,8 @@ public class Suffocate extends CoreAbility {
* The location of a Suffocate is defined at the benders location, not the
* location of the entities being suffocated.
*
* @param causer: the player causing this instance to be removed
* **/
* @param causer The player causing this instance to be removed
**/
public static boolean removeAtLocation(Player causer, Location loc, double radius) {
Iterator<Integer> it = getInstances().keySet().iterator();
while (it.hasNext()) {
@ -592,14 +592,14 @@ public class Suffocate extends CoreAbility {
private int i;
/**
* @param lent: the entity to animate the spiral around
* @param totalSteps: amount of times it will be animated
* @param radius: the radius of the spiral
* @param interval: the speed of the animation
* @param dx: x offset
* @param dy: y offset
* @param dz: z offset
* @param type: spiral animation direction
* @param lent The entity to animate the spiral around
* @param totalSteps Amount of times it will be animated
* @param radius The radius of the spiral
* @param interval The speed of the animation
* @param dx x offset
* @param dy y offset
* @param dz z offset
* @param type Spiral animation direction
*/
public SuffocateSpiral(LivingEntity lent, int totalSteps, double radius, long interval, double dx, double dy, double dz, SpiralType type) {
this.target = lent;
@ -617,14 +617,14 @@ public class Suffocate extends CoreAbility {
}
/**
* @param startLoc: initial location
* @param totalSteps: amount of times it will be animated
* @param radius: the radius of the spiral
* @param interval: the speed of the animation
* @param dx: x offset
* @param dy: y offset
* @param dz: z offset
* @param type: spiral animation direction
* @param startLoc Initial location
* @param totalSteps Amount of times it will be animated
* @param radius The radius of the spiral
* @param interval The speed of the animation
* @param dx x offset
* @param dy y offset
* @param dz z offset
* @param type Spiral animation direction
*/
public SuffocateSpiral(Location startLoc, int totalSteps, double radius, long interval, double dx, double dy, double dz, SpiralType type) {
this.startLoc = startLoc;

View file

@ -510,8 +510,8 @@ public class LavaFlow {
* isRegionProtected call since it isn't necessary in the case of just
* checking a specific material.
*
* @param mat the material to check
* @param the player that is earthbending
* @param mat The material to check
* @param player The player that is earthbending
* @return true if the material is earthbendable
*/
public static boolean isEarthbendableMaterial(Material mat, Player player) {

View file

@ -46,13 +46,10 @@ public class FireMethods {
*
* @param value The value
* @param world The world to pass into {@link #isDay(World)}
* <p>
* @return value DayFactor multiplied by specified value when
* {@link #isDay(World)} is true <br />
* else <br />
* value The specified value in the parameters
* </p>
* @see {@link #getFirebendingDayAugment(World)}
*/
public static double getFirebendingDayAugment(double value, World world) {
if (isDay(world)) {

View file

@ -158,7 +158,7 @@ public class Lightning extends CoreAbility {
/**
* Damages an entity, and may cause paralysis depending on the config.
*
* @param lent: the LivingEntity that is being damaged
* @param lent The LivingEntity that is being damaged
*/
public void electrocute(LivingEntity lent) {
lent.getWorld().playSound(lent.getLocation(), Sound.CREEPER_HISS, 1, 0);
@ -543,11 +543,12 @@ public class Lightning extends CoreAbility {
/**
* Randomly generates subarcs off of this arc.
*
* @param chance - The chance that an arc will be generated for each
* @param chance The chance that an arc will be generated for each
* specific point in the arc. Note: if you generate a lot of
* points then chance will need to be lowered.
* @param range: The length of each subarc.
* **/
* @param range The length of each subarc.
*
**/
public ArrayList<Arc> generateArcs(double chance, double range) {
ArrayList<Arc> arcs = new ArrayList<Arc>();
for (int i = 0; i < animLocs.size(); i++) {
@ -574,11 +575,11 @@ public class Lightning extends CoreAbility {
* middle that has an offset relative to the beginning and end points.
* Now that the arc is split into 3 points, we continue this processes
* by generating middle points in the two halfs of this arc. This
* process continues based on @times
* process continues the amount of times specified.
*
* @param times: The amount of times that the arc will be split in half
* @param times causes O(n^2) complexity
* **/
* @param times The amount of times that the arc will be split in half
* causes O(n^2) complexity
**/
public void generatePoints(int times) {
for (int i = 0; i < times; i++) {
for (int j = 0; j < points.size() - 1; j += 2) {

View file

@ -25,7 +25,7 @@ public abstract class Database {
}
/**
* Print information to console
* Print information to console.
*
* @param message The string to print to console
*/
@ -34,7 +34,7 @@ public abstract class Database {
}
/**
* Print error to console
* Print error to console.
*
* @param message The string to print to console
* @param severe If {@param severe} is true print an error, else print a warning
@ -45,7 +45,7 @@ public abstract class Database {
}
/**
* Returns the current Connection
* Returns the current Connection.
*
* @return Connection if exists, else null
*/
@ -54,14 +54,14 @@ public abstract class Database {
}
/**
* Opens connection to Database
* Opens connection to Database.
*
* @return Connection if successful
*/
abstract Connection open();
/**
* Close connection to Database
* Close connection to Database.
*/
public void close() {
if (!(this.connection == null)) {
@ -76,7 +76,7 @@ public abstract class Database {
}
/**
* Queries the Database, for queries which modify data
* Queries the Database, for queries which modify data.
*
* @param query Query to run
*/
@ -97,7 +97,7 @@ public abstract class Database {
}
/**
* Queries the Database, for queries which return results
* Queries the Database, for queries which return results.
*
* @param query Query to run
* @return Result set of ran query
@ -115,10 +115,10 @@ public abstract class Database {
}
/**
* Check database to see if {@param table} exists
*
* Check database to see if a table exists.
*
* @param table Table name to check
* @return True if table exists, else false
* @return true if table exists, else false
*/
public boolean tableExists(String table) {
try {

View file

@ -174,7 +174,7 @@ public class MetricsLite {
* Escape a string to create a valid JSON string
*
* @param text
* @return
* @return escape string for JSON
*/
private static String escapeJSON(String text) {
StringBuilder builder = new StringBuilder();
@ -220,7 +220,7 @@ public class MetricsLite {
* GZip compress a string of bytes
*
* @param input
* @return
* @return string of bytes
*/
public static byte[] gzip(String input) {
ByteArrayOutputStream baos = new ByteArrayOutputStream();

View file

@ -650,7 +650,6 @@ public enum ParticleEffect {
* @param speed Display speed of the particles
* @param amount Amount of particles
* @param center Center location of the effect
* @param range Range of the visibility
* @throws ParticleVersionException If the particle effect is not supported
* by the server version
* @throws ParticleDataException If the particle effect requires additional
@ -949,14 +948,14 @@ public enum ParticleEffect {
* Represents the item data for the {@link ParticleEffect#ITEM_CRACK} effect
* <p>
* This class is part of the <b>ParticleEffect Library</b> and follows the
* same usage conditions
* same usage conditions.
*
* @author DarkBlade12
* @since 1.6
*/
public static final class ItemData extends ParticleData {
/**
* Construct a new item data
* Construct a new item data.
*
* @param material Material of the item
* @param data Data value of the item

View file

@ -70,7 +70,6 @@ public final class ReflectionHandler {
* @throws ClassNotFoundException ClassNotFoundException If the desired
* target class with the specified name and package cannot be
* found
* @see #getClass(String, PackageType)
* @see #getConstructor(Class, Class...)
*/
public static Constructor<?> getConstructor(String className, PackageType packageType, Class<?>... parameterTypes) throws NoSuchMethodException, ClassNotFoundException {
@ -124,7 +123,6 @@ public final class ReflectionHandler {
* specified arguments cannot be found
* @throws ClassNotFoundException If the desired target class with the
* specified name and package cannot be found
* @see #getClass(String, PackageType)
* @see #instantiateObject(Class, Object...)
*/
public static Object instantiateObject(String className, PackageType packageType, Object... arguments) throws InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, ClassNotFoundException {
@ -169,7 +167,6 @@ public final class ReflectionHandler {
* found
* @throws ClassNotFoundException If the desired target class with the
* specified name and package cannot be found
* @see #getClass(String, PackageType)
* @see #getMethod(Class, String, Class...)
*/
public static Method getMethod(String className, PackageType packageType, String methodName, Class<?>... parameterTypes) throws NoSuchMethodException, ClassNotFoundException {
@ -248,7 +245,6 @@ public final class ReflectionHandler {
* class with the specified name and arguments cannot be found
* @throws ClassNotFoundException If the desired target class with the
* specified name and package cannot be found
* @see #getClass(String, PackageType)
* @see #invokeMethod(Object, Class, String, Object...)
*/
public static Object invokeMethod(Object instance, String className, PackageType packageType, String methodName, Object... arguments) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, ClassNotFoundException {
@ -606,7 +602,7 @@ public final class ReflectionHandler {
/**
* Returns the primitive class array of the given object array
*
* @param object Given object array
* @param objects Given object array
* @return The primitive class array
*/
public static Class<?>[] getPrimitive(Object[] objects) {
@ -621,7 +617,7 @@ public final class ReflectionHandler {
/**
* Returns the reference class array of the given object array
*
* @param object Given object array
* @param objects Given object array
* @return The reference class array
*/
public static Class<?>[] getReference(Object[] objects) {

View file

@ -200,7 +200,7 @@ public class WaterArms {
* Displays the right arm. Returns false if the arm cannot be fully
* displayed.
*
* @return
* @return false If arm cannot be fully displayed
*/
public boolean displayRightArm() {
if (rightArmConsumed)
@ -246,7 +246,7 @@ public class WaterArms {
* Displays the left arm. Returns false if the arm cannot be fully
* displayed.
*
* @return
* @return false If the arm cannot be fully displayed.
*/
public boolean displayLeftArm() {
if (leftArmConsumed)
@ -291,7 +291,7 @@ public class WaterArms {
/**
* Calculate roughly where the player's right hand is.
*
* @return
* @return location of right hand
*/
private Location getRightHandPos() {
return GeneralMethods.getRightSide(player.getLocation(), .34).add(0, 1.5, 0);
@ -300,7 +300,7 @@ public class WaterArms {
/**
* Calculate roughly where the player's left hand is.
*
* @return
* @return location of left hand
*/
private Location getLeftHandPos() {
return GeneralMethods.getLeftSide(player.getLocation(), .34).add(0, 1.5, 0);
@ -310,7 +310,7 @@ public class WaterArms {
* Returns the location of the tip of the right arm, assuming it is fully
* extended. Use the displayRightArm() check to see if it is fully extended.
*
* @return
* @return location of the tip of the right arm
*/
public Location getRightArmEnd() {
Location r1 = GeneralMethods.getRightSide(player.getLocation(), 2).add(0, 1.5, 0);
@ -321,7 +321,7 @@ public class WaterArms {
* Returns the location of the tip of the left arm assuming it is fully
* extended. Use the displayLeftArm() check to see if it is fully extended.
*
* @return
* @return location of the tip of the left arm
*/
public Location getLeftArmEnd() {
Location l1 = GeneralMethods.getLeftSide(player.getLocation(), 2).add(0, 1.5, 0);
@ -422,7 +422,7 @@ public class WaterArms {
/**
* Returns the active arm of the player.
*
* @return
* @return {@link Arm} of the player
*/
public Arm getActiveArm() {
return activeArm;
@ -441,7 +441,7 @@ public class WaterArms {
/**
* Switches to the most suitable arm for the player.
*
* @return
* @return the {@link Arm} that was swapped to
*/
public Arm switchPreferredArm() {
switchActiveArm();

View file

@ -41,7 +41,7 @@ public class WaterMethods {
* Checks to see if a Player is effected by BloodBending.
*
* @param player The player to check
* @return true If {@link #isChiBlocked(String)} is true <br />
* @return true If {@link ChiMethods#isChiBlocked(String)} is true <br />
* false If player is BloodBender and Bending is toggled on, or if
* player is in AvatarState
*/

View file

@ -1,6 +1,6 @@
name: ProjectKorra
author: ProjectKorra
version: 1.7.0 BETA 13
version: 1.7.0 BETA 14
main: com.projectkorra.projectkorra.ProjectKorra
softdepend: [PreciousStones, WorldGuard, WorldEdit, Factions, MassiveCore, GriefPrevention, Towny, NoCheatPlus, LWC]
commands: