Changelog will be posted, add alot
This commit is contained in:
@@ -76,32 +76,40 @@ public class PowerLossEvent extends FactionPlayerEvent implements Cancellable {
|
||||
|
||||
/**
|
||||
* Gets the configured damage to a players individual power on death
|
||||
*
|
||||
* @return power to be lost as a Double.
|
||||
*/
|
||||
public double getDefaultPowerLost() {return Conf.powerPerDeath;}
|
||||
public double getDefaultPowerLost() {
|
||||
return Conf.powerPerDeath;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the variable power lost. Custom power ignored when less than or equal to zero.
|
||||
*
|
||||
* @return custom power to be lost as a Double.
|
||||
*/
|
||||
public double getCustomPowerLost() {return this.modified;}
|
||||
public double getCustomPowerLost() {
|
||||
return this.modified;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the variable power lost. Custom power ignored when less than or equal to zero.
|
||||
*
|
||||
* @param loss Double amount for the custom power loss to be set to.
|
||||
*/
|
||||
public void setCustomPowerLost(Double loss) {modified = loss;}
|
||||
public void setCustomPowerLost(Double loss) {
|
||||
modified = loss;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if custom power is to be used.
|
||||
*
|
||||
* @return If custom power is to be used as a boolean.
|
||||
*/
|
||||
public boolean usingCustomPower() {
|
||||
if (modified > 0) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return modified > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCancelled() {
|
||||
return cancelled;
|
||||
|
||||
@@ -3,8 +3,6 @@ package com.massivecraft.factions.event;
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.FPlayer;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.zcore.persist.MemoryFPlayer;
|
||||
import com.massivecraft.factions.zcore.persist.MemoryFPlayers;
|
||||
import org.bukkit.event.Cancellable;
|
||||
|
||||
/**
|
||||
@@ -25,6 +23,7 @@ public class PowerRegenEvent extends FactionPlayerEvent implements Cancellable {
|
||||
|
||||
/**
|
||||
* Get the amount of power this player will regen by default
|
||||
*
|
||||
* @return power amount gained as a Double.
|
||||
*/
|
||||
public double getDefaultPowerGained() {
|
||||
@@ -33,26 +32,30 @@ public class PowerRegenEvent extends FactionPlayerEvent implements Cancellable {
|
||||
|
||||
/**
|
||||
* Get the amount of custom power this player will gain. Ignored if less than or equal to 0.
|
||||
*
|
||||
* @return Custom power as a double
|
||||
*/
|
||||
public double getCustomPower() {return modified;}
|
||||
|
||||
/**
|
||||
* Get if we will be using the custom power gain instead of default.
|
||||
* @return If we will process the event custom returned as a Boolean.
|
||||
*/
|
||||
public boolean usingCustomPower() {
|
||||
if (modified > 0) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
public double getCustomPower() {
|
||||
return modified;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the custom power gain for this event.
|
||||
*
|
||||
* @param gain Amount of power to be added to player.
|
||||
*/
|
||||
public void setCustomPower(Double gain) {modified = gain;}
|
||||
public void setCustomPower(Double gain) {
|
||||
modified = gain;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get if we will be using the custom power gain instead of default.
|
||||
*
|
||||
* @return If we will process the event custom returned as a Boolean.
|
||||
*/
|
||||
public boolean usingCustomPower() {
|
||||
return modified > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCancelled() {
|
||||
|
||||
Reference in New Issue
Block a user