SakuraBindAPI

public class SakuraBindAPI

绑定API

Properties

Link copied to clipboard
public final static SakuraBindAPI INSTANCE

Functions

Link copied to clipboard
public final static Unit bind(ItemStack item, BlockInfo blockInfo, BindType type, Boolean showLore, Boolean silent)
public final static Unit bind(ItemStack item, BlockInfo blockInfo, BindType type, Boolean showLore)
public final static Unit bind(ItemStack item, BlockInfo blockInfo, BindType type)
public final static Unit bind(ItemStack item, BlockInfo blockInfo)

物品从方块掉落物绑定

public final static Unit bind(ItemStack item, UUID uuid, Boolean showLore, BindType type, BaseSetting setting, Boolean silent)
public final static Unit bind(ItemStack item, UUID uuid, Boolean showLore, BindType type, BaseSetting setting)
public final static Unit bind(ItemStack item, UUID uuid, Boolean showLore, BindType type)
public final static Unit bind(ItemStack item, UUID uuid, BindType type)

将物品绑定UUID

public final static Unit bind(ItemStack item, Player player, Boolean showLore, BindType type, BaseSetting setting, Boolean silent)
public final static Unit bind(ItemStack item, Player player, Boolean showLore, BindType type, BaseSetting setting)
public final static Unit bind(ItemStack item, Player player, Boolean showLore, BindType type)
public final static Unit bind(ItemStack item, Player player, Boolean showLore)
public final static Unit bind(ItemStack item, Player player)

将物品绑定玩家

Link copied to clipboard
public final static Unit bindBlock(Block block, UUID uuid, BaseSetting setting, BindType type, List<String> extraData, Boolean silent)
public final static Unit bindBlock(Block block, UUID uuid, BaseSetting setting, BindType type, List<String> extraData)
public final static Unit bindBlock(Block block, UUID uuid, BaseSetting setting, BindType type)
public final static Unit bindBlock(Block block, UUID uuid, BaseSetting setting)

绑定方块

public final static Unit bindBlock(Player player, ItemStack handItem, Block block, UUID uuid, BaseSetting setting, Boolean isMultiPlace, Boolean silent)
public final static Unit bindBlock(Player player, ItemStack handItem, Block block, UUID uuid, BaseSetting setting, Boolean isMultiPlace)

物品放下变成方块

Link copied to clipboard
public final static Unit bindEntity(Entity entity, Player player, BaseSetting setting, BindType type, Boolean silent)
public final static Unit bindEntity(Entity entity, Player player, BaseSetting setting, BindType type)
public final static Unit bindEntity(Entity entity, Player player, BaseSetting setting)

绑定实体

Link copied to clipboard
public final static Boolean checkDenyBySetting(ItemStack item, HumanEntity player, String key)

检查物品行为是否被某个设置禁止

Link copied to clipboard
public final static Map<UUID, List<ItemStack>> filterInventory(Inventory inventory, UUID uuid, Boolean remove, Predicate<BaseSetting> predicate)
public final static Map<UUID, List<ItemStack>> filterInventory(Inventory inventory, UUID uuid, Boolean remove)
public final static Map<UUID, List<ItemStack>> filterInventory(Inventory inventory, UUID uuid)
public final static Map<UUID, List<ItemStack>> filterInventory(Inventory inventory)

从容器中删除 某个UUID 的绑定物品

public final static Map<UUID, List<ItemStack>> filterInventory(Inventory inventory, Boolean remove, Boolean deep, BiPredicate<UUID, ItemStack> predicate)
public final static Map<UUID, List<ItemStack>> filterInventory(Inventory inventory, Boolean remove, BiPredicate<UUID, ItemStack> predicate)
public final static Map<UUID, List<ItemStack>> filterInventory(Inventory inventory, BiPredicate<UUID, ItemStack> predicate)
Link copied to clipboard
public final static Map<UUID, List<ItemStack>> filterItem(ItemStack item, Boolean remove, Boolean deep, BiPredicate<UUID, ItemStack> predicate)

搜索符合条件的绑定物品

public final static Map<UUID, List<ItemStack>> filterItem(ItemStack item, UUID uuid, Boolean remove, Boolean deep, Predicate<BaseSetting> predicate)
public final static Map<UUID, List<ItemStack>> filterItem(ItemStack item, UUID uuid, Boolean remove, Boolean deep)
public final static Map<UUID, List<ItemStack>> filterItem(ItemStack item, UUID uuid, Boolean remove)
public final static Map<UUID, List<ItemStack>> filterItem(ItemStack item, UUID uuid)
public final static Map<UUID, List<ItemStack>> filterItem(ItemStack item)

从物品中提取绑定物品, 如果这个物品符合条件将会被设置为空气

Link copied to clipboard
public final static Map<UUID, List<ItemStack>> filterItems(Iterable<ItemStack> items, Boolean remove, Boolean deep, BiPredicate<UUID, ItemStack> predicate)
public final static Map<UUID, List<ItemStack>> filterItems(Iterable<ItemStack> items, Boolean remove, BiPredicate<UUID, ItemStack> predicate)
public final static Map<UUID, List<ItemStack>> filterItems(Iterable<ItemStack> items, BiPredicate<UUID, ItemStack> predicate)
public final static Map<UUID, List<ItemStack>> filterItems(Iterator<ItemStack> iterator, Boolean remove, Boolean deep, BiPredicate<UUID, ItemStack> predicate)
public final static Map<UUID, List<ItemStack>> filterItems(Iterator<ItemStack> iterator, Boolean remove, BiPredicate<UUID, ItemStack> predicate)
public final static Map<UUID, List<ItemStack>> filterItems(Iterator<ItemStack> iterator, BiPredicate<UUID, ItemStack> predicate)
Link copied to clipboard
public final static List<String> getBindLore(ItemStack item)

获取绑定物品的显示lore,如果是绑定物品返回null

Link copied to clipboard
public final static BlockInfo getBlockInfo(Block block)

获取方块的信息

Link copied to clipboard
public final static String getBlockOwner(Block block)

获取方块的拥有者

Link copied to clipboard
public final static BaseSetting getBlockSetting(Block block)

获取方块的设置

Link copied to clipboard
public final static Pair<String, BaseSetting> getEntityInfo(Entity entity)

获取实体的绑定信息

Link copied to clipboard
public final static String getEntityOwner(Entity entity)

获取实体的拥有者

Link copied to clipboard
public final static BaseSetting getEntitySetting(Entity entity)

获取方块的设置

Link copied to clipboard
public final static BaseSetting getItemSetting(ItemStack item)

获取物品的设置

Link copied to clipboard
public final static UUID getOwner(ItemStack item)

获取物品绑定的物主

Link copied to clipboard
public final static String getOwnerName(UUID uuid)

获取某个uuid的玩家名字

public final static String getOwnerName(ItemStack item)

获取物品绑定的物主

Link copied to clipboard
public final static String getOwnerStr(ItemStack item)
Link copied to clipboard
public final static BaseSetting getSetting(String key)

由Key 获取某个物品设置

Link copied to clipboard
public final static Boolean hasBind(Location location)

方块坐标是否被绑定

public final static Boolean hasBind(Block block)

public final static Boolean hasBind(Entity entity)

实体是否被绑定

public final static Boolean hasBind(ItemStack item)

物品是否被绑定

Link copied to clipboard
public final static Boolean hasInnerBind(ItemStack item)

物品及其容器内物品是否被绑定

Link copied to clipboard
public final static Boolean isAutoBind(ItemStack item)
Link copied to clipboard
public final static Boolean isBlockEnable()

是否启用方块绑定

Link copied to clipboard
public final static Boolean isEntityEnable()

是否启用实体绑定

Link copied to clipboard
public final static Boolean isOwner(ItemStack item, UUID uuid)

判断物品是否属于某个uuid的

public final static Boolean isOwner(ItemStack item, Player player)

判断物品是否属于某个玩家的

Link copied to clipboard
public final static Unit putSetting(String key, BaseSetting setting)

添加物品配置

Link copied to clipboard
public final static Unit sendBackItem(UUID uuid, Collection<ItemStack> items, Boolean notify, SendBackType type)
public final static Unit sendBackItem(UUID uuid, Collection<ItemStack> items, Boolean notify)
public final static Unit sendBackItem(UUID uuid, Collection<ItemStack> items)

将物品送回物主,玩家在线优先进背包

Link copied to clipboard
public final static Unit setSettingCache(ItemStack item, BaseSetting setting)

将物品的配置缓存设置为某个配置

Link copied to clipboard
public final static Unit unBind(ItemStack item, BindType type, Boolean silent)
public final static Unit unBind(ItemStack item, BindType type)
public final static Unit unBind(ItemStack item)

解绑物品

Link copied to clipboard
public final static Unit unbindBlock(Block block, BindType type, Boolean silent)
public final static Unit unbindBlock(Block block, BindType type)
public final static Unit unbindBlock(Block block)

解绑方块

Link copied to clipboard
public final static Unit unbindEntity(Entity entity, BindType type, Boolean silent)
public final static Unit unbindEntity(Entity entity, BindType type)
public final static Unit unbindEntity(Entity entity)

解绑实体

Link copied to clipboard
public final static Unit updateLore(ItemStack item, BaseSetting basesSetting)
public final static Unit updateLore(ItemStack item)

更新绑定物品的lore