Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package me.paauum.morgmc;
- import java.util.ArrayList;
- import java.util.Arrays;
- import java.util.List;
- import org.bukkit.Material;
- import org.bukkit.inventory.ItemStack;
- import org.bukkit.inventory.meta.ItemMeta;
- public class Maquina {
- public static ArrayList<Maquina> maquinas = new ArrayList<>();
- private ItemStack item;
- private List<ItemStack> drops;
- private int delay;
- public Maquina(ItemStack item, List<ItemStack> drops, int delay) {
- this.item = item;
- this.drops = drops;
- this.delay = delay;
- }
- public ItemStack getItem() {
- return item;
- }
- public void setItem(ItemStack item) {
- this.item = item;
- }
- public List<ItemStack> getDrops() {
- return drops;
- }
- public void setDrops(List<ItemStack> drops) {
- this.drops = drops;
- }
- public int getDelay() {
- return delay;
- }
- public void setDelay(int delay) {
- this.delay = delay;
- }
- public static Maquina getMaquinaPeloNumero(int numero) {
- return maquinas.stream().filter(e -> e.getDelay() == numero).findFirst().orElse(null);
- }
- public static ItemStack maq1() {
- ItemStack maq = new ItemStack(Material.STONE);
- maq.setDurability(Short.valueOf("0"));
- ItemMeta meta = maq.getItemMeta();
- meta.setDisplayName("§eMáquina Teste");
- meta.setLore(Arrays.asList("§1",
- "§7 teste",
- "§2"));
- maq.setItemMeta(meta);
- return maq;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement