mirror of
https://github.com/kiranhart/Auction-House.git
synced 2025-02-08 18:02:10 +01:00
💨 if material type is air just return a brand new item stack in ConfigurationItemHelper
Took 53 seconds
This commit is contained in:
parent
aec92eba0c
commit
6b87854af3
@ -25,6 +25,7 @@ import ca.tweetzy.core.utils.TextUtils;
|
||||
import ca.tweetzy.flight.comp.enums.ServerVersion;
|
||||
import ca.tweetzy.flight.nbtapi.NBT;
|
||||
import ca.tweetzy.flight.utils.QuickItem;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemFlag;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
@ -45,8 +46,12 @@ import java.util.stream.Collectors;
|
||||
public class ConfigurationItemHelper {
|
||||
|
||||
public static ItemStack createConfigurationItem(Player player, ItemStack stack, int model, String title, List<String> lore, HashMap<String, Object> replacements, String... nbtData) {
|
||||
if (stack == null) {
|
||||
return XMaterial.STONE.parseItem();
|
||||
}
|
||||
|
||||
if (stack.getType() == XMaterial.AIR.parseMaterial())
|
||||
return stack;
|
||||
return new ItemStack(Material.AIR, 1);
|
||||
|
||||
|
||||
final ItemMeta meta = stack.getItemMeta();
|
||||
|
Loading…
Reference in New Issue
Block a user