当前位置: 首页>>代码示例>>Java>>正文


Java Material.STAINED_GLASS_PANE属性代码示例

本文整理汇总了Java中org.bukkit.Material.STAINED_GLASS_PANE属性的典型用法代码示例。如果您正苦于以下问题:Java Material.STAINED_GLASS_PANE属性的具体用法?Java Material.STAINED_GLASS_PANE怎么用?Java Material.STAINED_GLASS_PANE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.bukkit.Material的用法示例。


在下文中一共展示了Material.STAINED_GLASS_PANE属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createGlass

public static ItemStack createGlass(String displayname, List<String> lore, DyeColor dye) {
    ItemStack item = new ItemStack(Material.STAINED_GLASS_PANE, 1, dye.getWoolData());
    ItemMeta meta = item.getItemMeta();
    meta.setDisplayName(Utils.colorize(displayname));

    ArrayList<String> colorLore = new ArrayList<>();
    if (lore != null) {
        lore.forEach(str -> colorLore.add(Utils.colorize(str)));
        meta.setLore(colorLore);
    }

    meta.addItemFlags(ItemFlag.HIDE_POTION_EFFECTS, ItemFlag.HIDE_ATTRIBUTES,
            ItemFlag.HIDE_DESTROYS, ItemFlag.HIDE_ENCHANTS, ItemFlag.HIDE_PLACED_ON, ItemFlag.HIDE_UNBREAKABLE);
    item.setItemMeta(meta);
    return item;
}
 
开发者ID:cadox8,项目名称:WC,代码行数:16,代码来源:ItemUtil.java

示例2: titaniumKitGlass

private ItemStack titaniumKitGlass(Player player) {
	ItemStack stack = new ItemStack(Material.STAINED_GLASS_PANE, 1, (short) 0, (byte) 14);
	ItemMeta meta = stack.getItemMeta();
	addGlow(stack);
	meta.setDisplayName(ChatColor.translateAlternateColorCodes('&', "&4Titanium &7Kit"));
	List<String> lore = new ArrayList<String>();
	lore.add(ChatColor.translateAlternateColorCodes('&', "&7This is a kit contains:"));
	lore.add(ChatColor.translateAlternateColorCodes('&', "&fGod Diamond kit!"));
	lore.add("");
	lore.add(ChatColor.translateAlternateColorCodes('&', "&8&l* &cPurchase the Titanium Rank from store.hcriots.net"));
	lore.add("");
	lore.add(ChatColor.translateAlternateColorCodes('&', "&8&l* &7CoolDown: &c3 Days"));
	if(cooldowns.containsKey(player.getUniqueId())) {
		if(cooldowns.get(player.getUniqueId()).containsKey("TitaniumKit")) {
			lore.add(ChatColor.translateAlternateColorCodes('&', "&8&l* &7Available in: &c" + DurationFormatUtils.formatDurationWords(cooldowns.get(player.getUniqueId()).get("TitaniumKit"), true, true)));
		} else {
			lore.add(ChatColor.translateAlternateColorCodes('&', "&8&l* &7Available in: &aNow"));
		}
	} else {
		lore.add(ChatColor.translateAlternateColorCodes('&', "&8&l* &7Available in: &aNow"));
	}
	meta.setLore(lore);
	stack.setItemMeta(meta);
	return stack;
}
 
开发者ID:funkemunky,项目名称:HCFCore,代码行数:25,代码来源:KitsCommand.java

示例3: minerKitGlass

private ItemStack minerKitGlass(Player player) {
	ItemStack stack = new ItemStack(Material.STAINED_GLASS_PANE, 1, (short) 0, (byte) 6);
	ItemMeta meta = stack.getItemMeta();
	addGlow(stack);
	meta.setDisplayName(ChatColor.translateAlternateColorCodes('&', "&9Miner &7Kit"));
	List<String> lore = new ArrayList<String>();
	lore.add(ChatColor.translateAlternateColorCodes('&', "&7This kit contains:"));
	lore.add(ChatColor.translateAlternateColorCodes('&', "&fGod Miner Set with Diamond Pickaxe and Anvils!"));
	lore.add("");
	lore.add(ChatColor.translateAlternateColorCodes('&', "&8&l* &cPurchase this from store.hcriots.net"));
	lore.add("");
	lore.add(ChatColor.translateAlternateColorCodes('&', "&8&l* &7CoolDown: &c3 Days"));
	if(cooldowns.containsKey(player.getUniqueId())) {
		if(cooldowns.get(player.getUniqueId()).containsKey("ArcherKit")) {
			lore.add(ChatColor.translateAlternateColorCodes('&', "&8&l* &7Available in: &c" + DurationFormatUtils.formatDurationWords(cooldowns.get(player.getUniqueId()).get("ArcherKit"), true, true)));
		} else {
			lore.add(ChatColor.translateAlternateColorCodes('&', "&8&l* &7Available in: &aNow"));
		}
	} else {
		lore.add(ChatColor.translateAlternateColorCodes('&', "&8&l* &7Available in: &aNow"));
	}
	meta.setLore(lore);
	stack.setItemMeta(meta);
	return stack;
}
 
开发者ID:funkemunky,项目名称:HCFCore,代码行数:25,代码来源:KitsCommand.java

示例4: archerKitGlass

private ItemStack archerKitGlass(Player player) {
	ItemStack stack = new ItemStack(Material.STAINED_GLASS_PANE, 1, (short) 0, (byte) 6);
	ItemMeta meta = stack.getItemMeta();
	addGlow(stack);
	meta.setDisplayName(ChatColor.translateAlternateColorCodes('&', "&dArcher &7Kit"));
	List<String> lore = new ArrayList<String>();
	lore.add(ChatColor.translateAlternateColorCodes('&', "&7This kit contains:"));
	lore.add(ChatColor.translateAlternateColorCodes('&', "&fGod Archer kit with Archer Materials!"));
	lore.add("");
	lore.add(ChatColor.translateAlternateColorCodes('&', "&8&l* &cPurchase this from store.hcriots.net"));
	lore.add("");
	lore.add(ChatColor.translateAlternateColorCodes('&', "&8&l* &7CoolDown: &c3 Days"));
	if(cooldowns.containsKey(player.getUniqueId())) {
		if(cooldowns.get(player.getUniqueId()).containsKey("ArcherKit")) {
			lore.add(ChatColor.translateAlternateColorCodes('&', "&8&l* &7Available in: &c" + DurationFormatUtils.formatDurationWords(cooldowns.get(player.getUniqueId()).get("ArcherKit"), true, true)));
		} else {
			lore.add(ChatColor.translateAlternateColorCodes('&', "&8&l* &7Available in: &aNow"));
		}
	} else {
		lore.add(ChatColor.translateAlternateColorCodes('&', "&8&l* &7Available in: &aNow"));
	}
	meta.setLore(lore);
	stack.setItemMeta(meta);
	return stack;
}
 
开发者ID:funkemunky,项目名称:HCFCore,代码行数:25,代码来源:KitsCommand.java

示例5: starterKitGlass

private ItemStack starterKitGlass(Player player) {
	ItemStack stack = new ItemStack(Material.STAINED_GLASS_PANE, 1, (short) 0, (byte) 13);
	ItemMeta meta = stack.getItemMeta();
	addGlow(stack);
	meta.setDisplayName(ChatColor.translateAlternateColorCodes('&', "&fStarter &7Kit"));
	List<String> lore = new ArrayList<String>();
	lore.add(ChatColor.translateAlternateColorCodes('&', "&7This kit contains:"));
	lore.add(ChatColor.translateAlternateColorCodes('&', "&fLeather Set with an Iron Sword, Iron Pickaxe, and Food!"));
	lore.add("");
	lore.add(ChatColor.translateAlternateColorCodes('&', "&8&l* &cPurchase this from store.hcriots.net"));
	lore.add("");
	lore.add(ChatColor.translateAlternateColorCodes('&', "&8&l* &7CoolDown: &c3 Days"));
	if(cooldowns.containsKey(player.getUniqueId())) {
		if(cooldowns.get(player.getUniqueId()).containsKey("StarterKit")) {
			lore.add(ChatColor.translateAlternateColorCodes('&', "&8&l* &7Available in: &c" + DurationFormatUtils.formatDurationWords(cooldowns.get(player.getUniqueId()).get("StarterKit"), true, true)));
		} else {
			lore.add(ChatColor.translateAlternateColorCodes('&', "&8&l* &7Available in: &aNow"));
		}
	} else {
		lore.add(ChatColor.translateAlternateColorCodes('&', "&8&l* &7Available in: &aNow"));
	}
	meta.setLore(lore);
	stack.setItemMeta(meta);
	return stack;
}
 
开发者ID:funkemunky,项目名称:HCFCore,代码行数:25,代码来源:KitsCommand.java

示例6: diamondKitGlass

private ItemStack diamondKitGlass(Player player) {
	ItemStack stack = new ItemStack(Material.STAINED_GLASS_PANE, 1, (short) 0, (byte) 9);
	ItemMeta meta = stack.getItemMeta();
	addGlow(stack);
	meta.setDisplayName(ChatColor.translateAlternateColorCodes('&', "&bDiamond &7Kit"));
	List<String> lore = new ArrayList<String>();
	lore.add(ChatColor.translateAlternateColorCodes('&', "&7This kit contains:"));
	lore.add(ChatColor.translateAlternateColorCodes('&', "&fGod Diamond kit with Looting!"));
	lore.add("");
	lore.add(ChatColor.translateAlternateColorCodes('&', "&8&l* &cPurchase this from store.hcriots.net"));
	lore.add("");
	lore.add(ChatColor.translateAlternateColorCodes('&', "&8&l* &7CoolDown: &c3 Days"));
	if(cooldowns.containsKey(player.getUniqueId())) {
		if(cooldowns.get(player.getUniqueId()).containsKey("DiamondKit")) {
			lore.add(ChatColor.translateAlternateColorCodes('&', "&8&l* &7Available in: &c" + DurationFormatUtils.formatDurationWords(cooldowns.get(player.getUniqueId()).get("DiamondKit"), true, true)));
		} else {
			lore.add(ChatColor.translateAlternateColorCodes('&', "&8&l* &7Available in: &aNow"));
		}
	} else {
		lore.add(ChatColor.translateAlternateColorCodes('&', "&8&l* &7Available in: &aNow"));
	}
	meta.setLore(lore);
	stack.setItemMeta(meta);
	return stack;
}
 
开发者ID:funkemunky,项目名称:HCFCore,代码行数:25,代码来源:KitsCommand.java

示例7: bardKitGlass

private ItemStack bardKitGlass(Player player) {
	ItemStack stack = new ItemStack(Material.STAINED_GLASS_PANE, 1, (short) 0, (byte) 4);
	ItemMeta meta = stack.getItemMeta();
	addGlow(stack);
	meta.setDisplayName(ChatColor.translateAlternateColorCodes('&', "&eBard &7Kit"));
	List<String> lore = new ArrayList<String>();
	lore.add(ChatColor.translateAlternateColorCodes('&', "&7This kit contains:"));
	lore.add(ChatColor.translateAlternateColorCodes('&', "&fGod Bard kit with Bard Materials!"));
	lore.add("");
	lore.add(ChatColor.translateAlternateColorCodes('&', "&8&l* &cPurchase this from store.hcriots.net"));
	lore.add("");
	lore.add(ChatColor.translateAlternateColorCodes('&', "&8&l* &7CoolDown: &c3 Days"));
	if(cooldowns.containsKey(player.getUniqueId())) {
		if(cooldowns.get(player.getUniqueId()).containsKey("BardKit")) {
			lore.add(ChatColor.translateAlternateColorCodes('&', "&8&l* &7Available in: &c" + DurationFormatUtils.formatDurationWords(cooldowns.get(player.getUniqueId()).get("BardKit"), true, true)));
		} else {
			lore.add(ChatColor.translateAlternateColorCodes('&', "&8&l* &7Available in: &aNow"));
		}
	} else {
		lore.add(ChatColor.translateAlternateColorCodes('&', "&8&l* &7Available in: &aNow"));
	}
	meta.setLore(lore);
	stack.setItemMeta(meta);
	return stack;
}
 
开发者ID:funkemunky,项目名称:HCFCore,代码行数:25,代码来源:KitsCommand.java

示例8: bowEnchantGUI

public static void bowEnchantGUI(Player player){
    bowGUI = Bukkit.createInventory(null, 9, ChatColor.DARK_GRAY + " Bow Enchantments");

    ItemStack filler = new ItemStack(Material.STAINED_GLASS_PANE, 1, (short) 7);
    ItemMeta fillerMeta = filler.getItemMeta();
    fillerMeta.setDisplayName(ChatColor.GRAY + "");
    filler.setItemMeta(fillerMeta);

    ItemStack back = new ItemStack(Material.ARROW);
    ItemMeta backMeta = back.getItemMeta();
    backMeta.setDisplayName(ChatColor.RED + "Previous");
    back.setItemMeta(backMeta);

    ItemStack empty = new ItemStack(Material.BARRIER);
    ItemMeta emptyMeta = empty.getItemMeta();
    emptyMeta.setDisplayName(ChatColor.RED + "There are currently no bow enchants!");
    empty.setItemMeta(emptyMeta);

    bowGUI.setItem(0, filler);
    bowGUI.setItem(1, filler);
    bowGUI.setItem(2, filler);
    bowGUI.setItem(3, filler);
    bowGUI.setItem(4, empty);
    bowGUI.setItem(5, filler);
    bowGUI.setItem(6, filler);
    bowGUI.setItem(7, filler);
    bowGUI.setItem(8, back);

    player.openInventory(bowGUI);
}
 
开发者ID:Warvale,项目名称:Scorch,代码行数:30,代码来源:EnchantsCommand.java

示例9: matAndDataTest

@Test
public void matAndDataTest() {
    ItemStack item = new ItemStack(Material.STAINED_GLASS_PANE, 1, (short) 14);
    MaterialAndData data = MaterialAndData.parse("160:14");
    assertTrue(data.isMatch(item));
    assertTrue(item.isSimilar(data.createItem()));
    assertFalse(MaterialAndData.parse("160").isMatch(item));
}
 
开发者ID:EntryPointKR,项目名称:MCLibrary,代码行数:8,代码来源:ItemTest.java

示例10: GUIndicator

public GUIndicator(GUILabel label, String actionDenied, String actiondelayed, String actionAccepted){
    super(actionDenied,  Material.STAINED_GLASS_PANE, (byte) 14 );
    this.label = label;
    this.actiondelayed = actiondelayed;
    this.actionAccepted = actionAccepted;
    setSize(new Vector2i( 1, 2 ));

}
 
开发者ID:LegendOnline,项目名称:InventoryAPI,代码行数:8,代码来源:GUIndicator.java

示例11: getPlaceholder10

public static  ItemStack getPlaceholder10(short data,int pass){
	ItemStack sw=new ItemStack(Material.STAINED_GLASS_PANE,1,data);
	ItemMeta im = sw.getItemMeta();
	if(pass>=100)
		im.setDisplayName("��9��l����� - �����ȡ��Ʒ!");
	else
		im.setDisplayName("��9��l����� "+pass+"%");
	sw.setItemMeta(im);
	return sw;
}
 
开发者ID:SchoolUniform,项目名称:RealSurvival,代码行数:10,代码来源:Items.java

示例12: getPlaceholder13

public static ItemStack getPlaceholder13(){
	ItemStack sw=new ItemStack(Material.STAINED_GLASS_PANE,1,(short)9);
	ItemMeta im = sw.getItemMeta();
	im.setDisplayName("��3��l��ˮ");
	sw.setItemMeta(im);
	return sw;
}
 
开发者ID:SchoolUniform,项目名称:RealSurvival,代码行数:7,代码来源:Items.java

示例13: newInventory

public static void newInventory(CommandSender sender) {
Inventory tpmenu = Bukkit.createInventory(null, 54, ChatColor.DARK_GRAY + "Teleport Menu - Page 1");

ItemStack empty = new ItemStack(Material.STAINED_GLASS_PANE, 1, (byte) 15);
ItemMeta emptyMeta = empty.getItemMeta();
emptyMeta.setDisplayName(" ");
empty.setItemMeta(emptyMeta);

ItemStack close = new ItemStack(Material.BARRIER);
ItemStack nextpage = new ItemStack(Material.SIGN);
ItemStack previouspage = new ItemStack(Material.SIGN);
ItemMeta npMeta = nextpage.getItemMeta();
ItemMeta ppMeta = previouspage.getItemMeta();
ItemMeta closeMeta = close.getItemMeta();
closeMeta.setDisplayName(ChatColor.RED + "Close the menu.");
   npMeta.setDisplayName(ChatColor.AQUA + "" + ChatColor.BOLD + "Next Page");
   ppMeta.setDisplayName(ChatColor.AQUA + "" + ChatColor.BOLD + "Previous Page");
   
   for (int i = 0; i < Bukkit.getOnlinePlayers().size(); i++) {
   	Player targetPlayer = (Player) Bukkit.getOnlinePlayers().toArray()[i];
    ItemStack skulls = new ItemStack(Material.SKULL_ITEM, 1,(byte) 3);
    SkullMeta skullsMeta = (SkullMeta) skulls.getItemMeta();
    skullsMeta.setDisplayName(ChatColor.YELLOW + "Teleport to " + ChatColor.GREEN + targetPlayer.getName());
    skullsMeta.setOwner(targetPlayer.getName());
    skulls.setItemMeta(skullsMeta);
    
    int beginningSlot = 9;
    tpmenu.setItem(i+beginningSlot, skulls);
   }
   
tpmenu.setItem(0, empty);
tpmenu.setItem(1, empty);
tpmenu.setItem(2, empty);
tpmenu.setItem(3, empty);
tpmenu.setItem(4, empty);
tpmenu.setItem(5, empty);
tpmenu.setItem(6, empty);
tpmenu.setItem(7, empty);
tpmenu.setItem(8, empty);
tpmenu.setItem(45, empty);
tpmenu.setItem(46, empty);
tpmenu.setItem(47, empty);
tpmenu.setItem(48, empty);
tpmenu.setItem(49, close);
tpmenu.setItem(50, empty);
tpmenu.setItem(51, empty);
tpmenu.setItem(52, empty);
tpmenu.setItem(53, nextpage);

((HumanEntity) sender).openInventory(tpmenu);
  }
 
开发者ID:SlamTheHam,项目名称:UltraCore,代码行数:51,代码来源:TeleportMenu.java

示例14: newInventory

public static void newInventory(CommandSender sender) {
Inventory tpheremenu = Bukkit.createInventory(null, 54, ChatColor.DARK_GRAY + "Teleport Here Menu - Page 1");

ItemStack empty = new ItemStack(Material.STAINED_GLASS_PANE, 1, (byte) 15);
ItemMeta emptyMeta = empty.getItemMeta();
emptyMeta.setDisplayName(" ");
empty.setItemMeta(emptyMeta);

ItemStack close = new ItemStack(Material.BARRIER);
ItemStack nextpage = new ItemStack(Material.SIGN);
ItemStack previouspage = new ItemStack(Material.SIGN);
ItemMeta npMeta = nextpage.getItemMeta();
ItemMeta ppMeta = previouspage.getItemMeta();
ItemMeta closeMeta = close.getItemMeta();
closeMeta.setDisplayName(ChatColor.RED + "Close the menu.");
   npMeta.setDisplayName(ChatColor.AQUA + "" + ChatColor.BOLD + "Next Page");
   ppMeta.setDisplayName(ChatColor.AQUA + "" + ChatColor.BOLD + "Previous Page");
   
   for (int i = 0; i < Bukkit.getOnlinePlayers().size(); i++) {
   	Player targetPlayer = (Player) Bukkit.getOnlinePlayers().toArray()[i];
    ItemStack skulls = new ItemStack(Material.SKULL_ITEM, 1,(byte) 3);
    SkullMeta skullsMeta = (SkullMeta) skulls.getItemMeta();
    skullsMeta.setDisplayName(ChatColor.YELLOW + "Teleport " + ChatColor.GREEN + targetPlayer.getName() + ChatColor.YELLOW + " to you.");
    skullsMeta.setOwner(targetPlayer.getName());
    skulls.setItemMeta(skullsMeta);
    
    int beginningSlot = 9;
    tpheremenu.setItem(i+beginningSlot, skulls);
   }
   
tpheremenu.setItem(0, empty);
tpheremenu.setItem(1, empty);
tpheremenu.setItem(2, empty);
tpheremenu.setItem(3, empty);
tpheremenu.setItem(4, empty);
tpheremenu.setItem(5, empty);
tpheremenu.setItem(6, empty);
tpheremenu.setItem(7, empty);
tpheremenu.setItem(8, empty);
tpheremenu.setItem(45, empty);
tpheremenu.setItem(46, empty);
tpheremenu.setItem(47, empty);
tpheremenu.setItem(48, empty);
tpheremenu.setItem(49, close);
tpheremenu.setItem(50, empty);
tpheremenu.setItem(51, empty);
tpheremenu.setItem(52, empty);
tpheremenu.setItem(53, nextpage);

((HumanEntity) sender).openInventory(tpheremenu);
  }
 
开发者ID:SlamTheHam,项目名称:UltraCore,代码行数:51,代码来源:TeleportHereMenu.java

示例15: newInventory

public static void newInventory(CommandSender sender) {
    Inventory tpheremenu = Bukkit.createInventory(null, 54, ChatColor.DARK_GRAY + "Teleport Here Menu - Page 1");

    ItemStack empty = new ItemStack(Material.STAINED_GLASS_PANE, 1, (byte) 15);
    ItemMeta emptyMeta = empty.getItemMeta();
    emptyMeta.setDisplayName(" ");
    empty.setItemMeta(emptyMeta);

    ItemStack close = new ItemStack(Material.BARRIER);
    ItemStack nextpage = new ItemStack(Material.SIGN);
    ItemStack previouspage = new ItemStack(Material.SIGN);
    ItemMeta npMeta = nextpage.getItemMeta();
    ItemMeta ppMeta = previouspage.getItemMeta();
    ItemMeta closeMeta = close.getItemMeta();
    closeMeta.setDisplayName(ChatColor.RED + "Close the menu.");
    npMeta.setDisplayName(ChatColor.AQUA + "" + ChatColor.BOLD + "Next Page");
    ppMeta.setDisplayName(ChatColor.AQUA + "" + ChatColor.BOLD + "Previous Page");

    for (int i = 0; i < Bukkit.getOnlinePlayers().size(); i++) {
        Player targetPlayer = (Player) Bukkit.getOnlinePlayers().toArray()[i];
        ItemStack skulls = new ItemStack(Material.SKULL_ITEM, 1, (byte) 3);
        SkullMeta skullsMeta = (SkullMeta) skulls.getItemMeta();
        skullsMeta.setDisplayName(ChatColor.YELLOW + "Teleport " + ChatColor.GREEN + targetPlayer.getName() + ChatColor.YELLOW + " to you.");
        skullsMeta.setOwner(targetPlayer.getName());
        skulls.setItemMeta(skullsMeta);

        int beginningSlot = 9;
        tpheremenu.setItem(i + beginningSlot, skulls);
    }

    tpheremenu.setItem(0, empty);
    tpheremenu.setItem(1, empty);
    tpheremenu.setItem(2, empty);
    tpheremenu.setItem(3, empty);
    tpheremenu.setItem(4, empty);
    tpheremenu.setItem(5, empty);
    tpheremenu.setItem(6, empty);
    tpheremenu.setItem(7, empty);
    tpheremenu.setItem(8, empty);
    tpheremenu.setItem(45, empty);
    tpheremenu.setItem(46, empty);
    tpheremenu.setItem(47, empty);
    tpheremenu.setItem(48, empty);
    tpheremenu.setItem(49, close);
    tpheremenu.setItem(50, empty);
    tpheremenu.setItem(51, empty);
    tpheremenu.setItem(52, empty);
    tpheremenu.setItem(53, nextpage);

    ((HumanEntity) sender).openInventory(tpheremenu);
}
 
开发者ID:SlamTheHam,项目名称:UltraCore,代码行数:51,代码来源:TeleportHereMenu.java


注:本文中的org.bukkit.Material.STAINED_GLASS_PANE属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。