2015-11-02 20:39:44 +00:00
|
|
|
package WayofTime.bloodmagic.api.iface;
|
2015-10-30 03:22:14 +00:00
|
|
|
|
|
|
|
import net.minecraft.entity.player.EntityPlayer;
|
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
|
2016-02-04 08:25:37 +00:00
|
|
|
import javax.annotation.Nullable;
|
|
|
|
|
2015-10-30 03:22:14 +00:00
|
|
|
/**
|
|
|
|
* Implement this interface on any Item that can be bound to a player.
|
|
|
|
*/
|
2015-12-30 20:34:40 +00:00
|
|
|
public interface IBindable
|
|
|
|
{
|
2016-02-04 08:25:37 +00:00
|
|
|
/**
|
|
|
|
* Gets the username of the Item's owner. Usually for display,
|
|
|
|
* such as in the tooltip.
|
|
|
|
*
|
|
|
|
* If the item is not bound, this will be null.
|
|
|
|
*
|
|
|
|
* @param stack
|
|
|
|
* - The owned ItemStack
|
|
|
|
*
|
|
|
|
* @return - The username of the Item's owner
|
|
|
|
*/
|
|
|
|
String getOwnerName(ItemStack stack);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the UUID of the Item's owner.
|
|
|
|
*
|
|
|
|
* If the item is not bound, this will be null.
|
|
|
|
*
|
|
|
|
* @param stack
|
|
|
|
* - The owned ItemStack
|
|
|
|
*
|
|
|
|
* @return - The UUID of the Item's owner
|
|
|
|
*/
|
|
|
|
String getOwnerUUID(ItemStack stack);
|
|
|
|
|
2015-10-30 03:22:14 +00:00
|
|
|
/**
|
|
|
|
* Called when the player attempts to bind the item.
|
2016-01-02 22:56:37 +00:00
|
|
|
*
|
2016-01-01 18:52:42 +00:00
|
|
|
* @param player
|
2016-01-02 22:56:37 +00:00
|
|
|
* - The Player attempting to bind the item
|
2016-01-01 18:52:42 +00:00
|
|
|
* @param stack
|
2016-01-02 22:56:37 +00:00
|
|
|
* - The ItemStack to attempt binding
|
|
|
|
*
|
2016-01-01 18:52:42 +00:00
|
|
|
* @return If binding was successful.
|
2015-10-30 03:22:14 +00:00
|
|
|
*/
|
|
|
|
boolean onBind(EntityPlayer player, ItemStack stack);
|
|
|
|
}
|