package de.steamwar.bausystem.features.util.items;

import de.steamwar.bausystem.BauSystem;
import de.steamwar.bausystem.Permission;
import de.steamwar.bausystem.linkage.specific.BauGuiItem;
import de.steamwar.inventory.SWItem;
import de.steamwar.linkage.Linked;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.event.inventory.ClickType;
import org.bukkit.inventory.ItemStack;

@Linked
public class SchemBauGuiItem extends BauGuiItem {
    public SchemBauGuiItem() {
        super(35);
    }

    @Override
    public Permission permission() {
        return Permission.BUILD;
    }

    @Override
    public ItemStack getItem(Player player) {
        return new SWItem(Material.CHEST, BauSystem.MESSAGE.parse("SCHEMATIC_GUI_ITEM", player)).getItemStack();
    }

    @Override
    public boolean click(ClickType click, Player p) {
        p.performCommand("schematic gui");
        return false;
    }
}
