-
Notifications
You must be signed in to change notification settings - Fork 0
Developer API
Denis Istratov edited this page Mar 31, 2024
·
11 revisions
Gradle
repositories {
maven { url 'https://jitpack.io' }
}
dependencies {
compileOnly 'com.github.iRedTea:NoDropX:VERSION'
}
Maven
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
<dependency>
<groupId>com.github.iRedTea</groupId>
<artifactId>NoDropX</artifactId>
<version>VERSION</version>
<scope>provided</scope>
</dependency>
NoDropAPI api = NoDropX.getAPI();
Set no drop to item
setNoDrop(@NotNull ItemStack item, boolean isNoDrop);
Check if item is no drop item
isNoDrop(@NotNull ItemStack item);
Get no drop item stack
ItemStack getNoDrop(@NotNull Material material, int amount);
Returns the slot numbers that no drop item with this material saves at death
getCapacitySlots(Material material);
Set AllNoDrop status to item
setAllNoDrop(@NotNull ItemStack item, boolean isAllNoDrop);
Check if item AllNoDrop
isAllNoDrop(@NotNull ItemStack item);
Get allnodrop item stack
ItemStack getAllNoDrop(@NotNull Material material, int amount);
PlayerChangeNoDropEvent.java calls when no drop status of item changes by player
NoDropItemDropOnDeathEvent.java calls when player dies with no drop item in inventory
NoDropItemThrownEvent.java calls when player thrown out from inventory no drop item
Returns StorageManipulator of player
api.getStorageManipulator(UUID);
Adds no drop item to player storage
add(@NotNull ItemStack item);
Remove no drop item to player storage
remove(@NotNull ItemStack item);
return items in storage
all();