Skip to content

Commit

Permalink
New methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
LoneDev6 committed Oct 13, 2023
1 parent c1ec808 commit 54f2155
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<groupId>dev.lone</groupId>
<artifactId>api-itemsadder</artifactId>
<version>3.5.0c-r5</version>
<version>3.6.1</version>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
42 changes: 42 additions & 0 deletions src/main/java/dev/lone/itemsadder/api/CustomFurniture.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package dev.lone.itemsadder.api;

import org.bukkit.Color;
import org.bukkit.Location;
import org.bukkit.block.Block;
import org.bukkit.entity.Entity;
Expand Down Expand Up @@ -123,6 +124,47 @@ public void replaceFurniture(String newFurnitureNamespacedId)
throw new NotActuallyItemsAdderException();
}

/**
* Replace the model of this furniture with the model of another furniture.
*
* @param newFurnitureNamespacedId the namespace and ID of the new furniture model.
* @param color the new color of this furniture. Will apply only to naturally colorable items.
*/
public void replaceFurniture(String newFurnitureNamespacedId, Color color)
{
throw new NotActuallyItemsAdderException();
}

/**
* Replace color of this furniture. Will apply only to naturally colorable items.
*
* @param color the new color of this furniture. Will apply only to naturally colorable items.
*/
public void setColor(Color color)
{
throw new NotActuallyItemsAdderException();
}

/**
* Returns the original light level of this CustomFurniture.
*
* @return Integer representing the original light level of the CustomFurniture.
*/
public int getOriginalLightLevel()
{
throw new NotActuallyItemsAdderException();
}

/**
* Sets the current light level for this CustomFurniture.
*
* @param level The light level to set for this CustomFurniture.
*/
public void setCurrentLightLevel(int level)
{
throw new NotActuallyItemsAdderException();
}

/**
* Gets the Armor stand associated with this CustomFurniture.
* <br>This may return null if the Armor stand is not yet spawned in the world.
Expand Down
10 changes: 10 additions & 0 deletions src/main/java/dev/lone/itemsadder/api/CustomStack.java
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,16 @@ public void setDurability(int durability)
throw new NotActuallyItemsAdderException();
}

/**
* Sets the custom max durability of this CustomStack to the provided integer.
*
* @param maxDurability The max durability to set for this CustomStack.
*/
public void setMaxDurability(int maxDurability)
{
throw new NotActuallyItemsAdderException();
}

/**
* Gets the maximum custom durability of this CustomStack.
*
Expand Down
15 changes: 15 additions & 0 deletions src/main/java/dev/lone/itemsadder/api/ItemsAdder.java
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,21 @@ public static ItemStack setCustomItemDurability(ItemStack item, int durability)
throw new NotActuallyItemsAdderException();
}

/**
* Please use {@link CustomStack} instead.
* <p>
* Set the custom durability of a custom item.
*
* @param item Custom item.
* @param maxDurability Max durability to set.
* @return The modified ItemStack.
*/
@Deprecated
public static ItemStack setCustomItemMaxDurability(ItemStack item, int maxDurability)
{
throw new NotActuallyItemsAdderException();
}

/**
* Please use {@link CustomStack} instead.
* <p>
Expand Down

0 comments on commit 54f2155

Please sign in to comment.