For the complete documentation index, see llms.txt. This page is also available as Markdown.

πŸ›‘Blacklist

Blacklist your custom items

Create your own blacklist class implement from IBlacklist

public class BlacklistSimilar implements IBlacklist {

	private final List<ItemStack> itemstacks;

	/**
	 * @param itemstacks
	 */
	public BlacklistSimilar(List<ItemStack> itemstacks) {
		super();
		this.itemstacks = itemstacks;
	}

	@Override
	public String getName() {
		return "Similar itemstack";
	}

	@Override
	public boolean isBlacklist(ItemStack itemStack) {
		return this.itemstacks.stream()
				.anyMatch(stack -> stack != null && itemStack != null && stack.isSimilar(itemStack));
	}

}

After your need to use the method registerBlacklist in IBlacklistManager class

Last updated