UltimateStacker/UltimateStacker-API/src/main/java/com/craftaro/ultimatestacker/api/stack/block/BlockStackManager.java

69 lines
1.9 KiB
Java
Raw Normal View History

2023-05-25 19:20:03 +02:00
package com.craftaro.ultimatestacker.api.stack.block;
import com.craftaro.core.compatibility.CompatibleMaterial;
import com.craftaro.core.database.Data;
2023-06-29 11:18:18 +02:00
import com.craftaro.core.third_party.com.cryptomorin.xseries.XMaterial;
2023-05-25 19:20:03 +02:00
import org.bukkit.Location;
2023-05-30 11:20:31 +02:00
import org.bukkit.Material;
2023-05-25 19:20:03 +02:00
import org.bukkit.block.Block;
2023-05-30 11:20:31 +02:00
import org.bukkit.inventory.ItemStack;
2023-05-25 19:20:03 +02:00
import java.util.Collection;
import java.util.Map;
public interface BlockStackManager {
void addBlocks(Map<Location, BlockStack> blocks);
BlockStack addBlock(BlockStack blockStack);
BlockStack removeBlock(Location location);
BlockStack getBlock(Location location);
2023-06-29 11:18:18 +02:00
BlockStack getBlock(Block block, XMaterial material);
2023-05-25 19:20:03 +02:00
2023-06-29 11:18:18 +02:00
BlockStack createBlock(Location location, XMaterial material);
2023-05-25 19:20:03 +02:00
BlockStack createBlock(Block block);
boolean isBlock(Location location);
Collection<BlockStack> getStacks();
2023-05-30 11:20:31 +02:00
Collection<Data> getStacksData();
2023-05-30 11:20:31 +02:00
/**
* Check to see if this material is not permitted to stack
*
* @param item Item material to check
* @return true if this material will not stack
*/
boolean isMaterialBlacklisted(ItemStack item);
/**
* Check to see if this material is not permitted to stack
*
* @param type Material to check
* @return true if this material will not stack
*/
boolean isMaterialBlacklisted(String type);
/**
* Check to see if this material is not permitted to stack
*
* @param type Material to check
* @return true if this material will not stack
*/
boolean isMaterialBlacklisted(Material type);
/**
* Check to see if this material is not permitted to stack
*
* @param type Material to check
* @param data data value for this item (for 1.12 and older servers)
* @return true if this material will not stack
*/
boolean isMaterialBlacklisted(Material type, byte data);
2023-05-25 19:20:03 +02:00
}