2023-05-25 19:20:03 +02:00
|
|
|
package com.craftaro.ultimatestacker.api.stack.block;
|
|
|
|
|
|
|
|
import com.songoda.core.compatibility.CompatibleMaterial;
|
2023-06-05 16:25:37 +02:00
|
|
|
import com.songoda.core.database.Data;
|
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);
|
|
|
|
|
|
|
|
BlockStack getBlock(Block block, CompatibleMaterial material);
|
|
|
|
|
|
|
|
BlockStack createBlock(Location location, CompatibleMaterial material);
|
|
|
|
|
|
|
|
BlockStack createBlock(Block block);
|
|
|
|
|
|
|
|
boolean isBlock(Location location);
|
|
|
|
|
|
|
|
Collection<BlockStack> getStacks();
|
2023-05-30 11:20:31 +02:00
|
|
|
|
2023-06-05 16:25:37 +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
|
|
|
}
|