diff --git a/TwosideKeeper.jar b/TwosideKeeper.jar index 4536ac6..b81a358 100644 Binary files a/TwosideKeeper.jar and b/TwosideKeeper.jar differ diff --git a/src/sig/plugin/TwosideKeeper/HelperStructures/Common/GenericFunctions.java b/src/sig/plugin/TwosideKeeper/HelperStructures/Common/GenericFunctions.java index 1ede5cf..061a4da 100644 --- a/src/sig/plugin/TwosideKeeper/HelperStructures/Common/GenericFunctions.java +++ b/src/sig/plugin/TwosideKeeper/HelperStructures/Common/GenericFunctions.java @@ -1776,6 +1776,16 @@ public class GenericFunctions { case COOKED_BEEF:{ return "Steak"; } + case GOLDEN_APPLE:{ + switch (type.getDurability()) { + case 0:{ + return "Golden Apple"; + } + case 1:{ + return ChatColor.LIGHT_PURPLE+"Golden Apple"; + } + } + } default:{ return GenericFunctions.CapitalizeFirstLetters(type.getType().toString().replace("_", " ")); } diff --git a/src/sig/plugin/TwosideKeeper/TwosideKeeperAPI.java b/src/sig/plugin/TwosideKeeper/TwosideKeeperAPI.java index 8dcf773..9be37a9 100644 --- a/src/sig/plugin/TwosideKeeper/TwosideKeeperAPI.java +++ b/src/sig/plugin/TwosideKeeper/TwosideKeeperAPI.java @@ -94,6 +94,52 @@ public final class TwosideKeeperAPI { public static ItemStack removeAllArtifactAbilityPoints(ItemStack 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. public static long getServerTickTime() {