Skip to content

Commit db24bbb

Browse files
author
Jan Kluka
committed
1.4
Added method to get enchant activations count
1 parent 186bf36 commit db24bbb

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>dev.drawethree.xprison</groupId>
66
<artifactId>X-PrisonAPI</artifactId>
7-
<version>1.3-SNAPSHOT</version>
7+
<version>1.4-SNAPSHOT</version>
88
<packaging>jar</packaging>
99

1010
<name>X-PrisonAPI</name>

src/main/java/dev/drawethree/xprison/api/enchants/XPrisonEnchantsAPI.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,15 @@ public interface XPrisonEnchantsAPI {
5454
*/
5555
int getEnchantLevel(ItemStack item, XPrisonEnchantment enchantment);
5656

57+
/**
58+
* Retrieves the number of activations for a specific enchantment on the given item.
59+
*
60+
* @param item The {@link ItemStack} to check for the enchantment's activations.
61+
* @param enchantment The {@link XPrisonEnchantment} whose activations are to be determined.
62+
* @return The total number of times the specified enchantment has been activated on the item.
63+
*/
64+
long getAmountOfActivations(ItemStack item, XPrisonEnchantment enchantment);
65+
5766
/**
5867
* Sets or updates a specific enchantment with a defined level on an item.
5968
*

0 commit comments

Comments
 (0)