ItemStack repair check API

This commit is contained in:
Jake Potrebic
2021-05-15 22:10:50 -07:00
parent d30a14d638
commit fce24f3b52
2 changed files with 32 additions and 0 deletions

View File

@@ -187,5 +187,15 @@ public interface UnsafeValues {
* @return the server's protocol version
*/
int getProtocolVersion();
/**
* Checks if an itemstack can be repaired with another itemstack.
* Returns false if either argument's type is not an item ({@link Material#isItem()}).
*
* @param itemToBeRepaired the itemstack to be repaired
* @param repairMaterial the repair material
* @return true if valid repair, false if not
*/
public boolean isValidRepairItemStack(@org.jetbrains.annotations.NotNull ItemStack itemToBeRepaired, @org.jetbrains.annotations.NotNull ItemStack repairMaterial);
// Paper end
}