2018-02-05 17:04:38 -08:00
|
|
|
package WayofTime.bloodmagic.apibutnotreally.iface;
|
2015-10-29 20:22:14 -07:00
|
|
|
|
|
|
|
import net.minecraft.entity.player.EntityPlayer;
|
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Implement this interface on any Item that can be bound to a player.
|
|
|
|
*/
|
2017-08-15 21:30:48 -07:00
|
|
|
public interface IBindable {
|
2016-02-04 00:25:37 -08:00
|
|
|
/**
|
2016-03-16 18:41:06 -04:00
|
|
|
* Gets the username of the Item's owner. Usually for display, such as in
|
|
|
|
* the tooltip.
|
2017-08-15 21:30:48 -07:00
|
|
|
* <p>
|
2016-02-04 00:25:37 -08:00
|
|
|
* If the item is not bound, this will be null.
|
2017-08-15 21:30:48 -07:00
|
|
|
*
|
|
|
|
* @param stack - The owned ItemStack
|
2016-02-04 00:25:37 -08:00
|
|
|
* @return - The username of the Item's owner
|
|
|
|
*/
|
|
|
|
String getOwnerName(ItemStack stack);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the UUID of the Item's owner.
|
2017-08-15 21:30:48 -07:00
|
|
|
* <p>
|
2016-02-04 00:25:37 -08:00
|
|
|
* If the item is not bound, this will be null.
|
2017-08-15 21:30:48 -07:00
|
|
|
*
|
|
|
|
* @param stack - The owned ItemStack
|
2016-02-04 00:25:37 -08:00
|
|
|
* @return - The UUID of the Item's owner
|
|
|
|
*/
|
|
|
|
String getOwnerUUID(ItemStack stack);
|
|
|
|
|
2015-10-29 20:22:14 -07:00
|
|
|
/**
|
|
|
|
* Called when the player attempts to bind the item.
|
2017-08-15 21:30:48 -07:00
|
|
|
*
|
|
|
|
* @param player - The Player attempting to bind the item
|
|
|
|
* @param stack - The ItemStack to attempt binding
|
2016-01-01 10:52:42 -08:00
|
|
|
* @return If binding was successful.
|
2015-10-29 20:22:14 -07:00
|
|
|
*/
|
|
|
|
boolean onBind(EntityPlayer player, ItemStack stack);
|
|
|
|
}
|