->Add API methods relating to modifying AP on Artifact items.
This commit is contained in:
parent
9e5b9b68f2
commit
4a59c504ba
Binary file not shown.
@ -1776,6 +1776,16 @@ public class GenericFunctions {
|
|||||||
case COOKED_BEEF:{
|
case COOKED_BEEF:{
|
||||||
return "Steak";
|
return "Steak";
|
||||||
}
|
}
|
||||||
|
case GOLDEN_APPLE:{
|
||||||
|
switch (type.getDurability()) {
|
||||||
|
case 0:{
|
||||||
|
return "Golden Apple";
|
||||||
|
}
|
||||||
|
case 1:{
|
||||||
|
return ChatColor.LIGHT_PURPLE+"Golden Apple";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
default:{
|
default:{
|
||||||
return GenericFunctions.CapitalizeFirstLetters(type.getType().toString().replace("_", " "));
|
return GenericFunctions.CapitalizeFirstLetters(type.getType().toString().replace("_", " "));
|
||||||
}
|
}
|
||||||
|
@ -94,6 +94,52 @@ public final class TwosideKeeperAPI {
|
|||||||
public static ItemStack removeAllArtifactAbilityPoints(ItemStack item) {
|
public static ItemStack removeAllArtifactAbilityPoints(ItemStack item) {
|
||||||
return ArtifactAbility.removeAllEnchantments(item);
|
return ArtifactAbility.removeAllEnchantments(item);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param item
|
||||||
|
* @return -1 if the item is not a valid artifact. The Maximum AP otherwise.
|
||||||
|
*/
|
||||||
|
public static int getArtifactMaxAP(ItemStack item) {
|
||||||
|
return AwakenedArtifact.getMaxAP(item);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param item
|
||||||
|
* @return The current AP remaining on an artifact. -1 if the item is not a valid artifact.
|
||||||
|
*/
|
||||||
|
public static int getArtifactAP(ItemStack item) {
|
||||||
|
return AwakenedArtifact.getAP(item);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @return The updated item.
|
||||||
|
*/
|
||||||
|
public static ItemStack setArtifactAP(ItemStack item, int newap) {
|
||||||
|
return AwakenedArtifact.setAP(item, newap);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Sets the current AP amount. Equivalent of doing setArtifactAP(item,getArtifactAP(item)+ap);
|
||||||
|
* @param item
|
||||||
|
* @param newap
|
||||||
|
* @return The updated item.
|
||||||
|
*/
|
||||||
|
public static ItemStack addArtifactAP(ItemStack item, int ap) {
|
||||||
|
return AwakenedArtifact.addAP(item, ap);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @return The updated item.
|
||||||
|
*/
|
||||||
|
public static ItemStack setArtifactMaxAP(ItemStack item, int newmaxap) {
|
||||||
|
return AwakenedArtifact.setMaxAP(item, newmaxap);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Adds to the current Max AP amount. Equivalent of doing setArtifactMaxAP(item,getArtifactMaxAP(item)+ap);
|
||||||
|
* @param item
|
||||||
|
* @param newap
|
||||||
|
* @return The updated item.
|
||||||
|
*/
|
||||||
|
public static ItemStack addArtifactMaxAP(ItemStack item, int maxap) {
|
||||||
|
return AwakenedArtifact.addMaxAP(item, maxap);
|
||||||
|
}
|
||||||
|
|
||||||
//Time Commands.
|
//Time Commands.
|
||||||
public static long getServerTickTime() {
|
public static long getServerTickTime() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user