本文整理汇总了Java中org.bukkit.Material.NETHER_STAR属性的典型用法代码示例。如果您正苦于以下问题:Java Material.NETHER_STAR属性的具体用法?Java Material.NETHER_STAR怎么用?Java Material.NETHER_STAR使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.bukkit.Material
的用法示例。
在下文中一共展示了Material.NETHER_STAR属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getPlaceholder6
/**
* l.add("��9���ص��ϸ�����");
* @return ����
*/
public static ItemStack getPlaceholder6(){
ItemStack sw=new ItemStack(Material.NETHER_STAR);
ItemMeta im = sw.getItemMeta();
im.setDisplayName("��9��l����");
List<String> l=new LinkedList<String>();
l.add("��9���ص��ϸ�����");
im.setLore(l);
sw.setItemMeta(im);
return sw;
}
示例2: onPlayerInteract
/**
* Event fired when a player uses his nether star
*
* @param event Event
*/
@EventHandler
public void onPlayerInteract(PlayerInteractEvent event)
{
if (this.game.getStatus().equals(Status.IN_GAME))
event.getHandlers().unregister(this);
else if (event.getItem() != null && event.getItem().getType() == Material.NETHER_STAR)
this.openGui(event.getPlayer(), new GuiSelectTeam());
}
示例3: onPlayerInteract
@EventHandler
public void onPlayerInteract(PlayerInteractEvent e) {
e.setCancelled(true);
e.getPlayer().updateInventory();
ItemStack item = e.getItem();
if(item == null) return;
Player player = e.getPlayer();
CPlayer cplayer = AgarMC.get().getGame().getCPlayer(player);
if(cplayer == null) return;
if(item.getType() == Material.WRITTEN_BOOK) {
e.setCancelled(false);
return ;
} else if(item.getType() == Material.WOOL) {
TeamSelectorGui.display(player);
} else if(item.getType() == SamaGamesAPI.get().getGameManager().getCoherenceMachine().getLeaveItem().getType()) {
SamaGamesAPI.get().getGameManager().kickPlayer(player, ChatColor.RED + "Vous avez quitté la partie");
}
if(!cplayer.isPlaying()) {
if(item.getType() == Material.NETHER_STAR) {
player.sendMessage(ChatColor.DARK_GREEN + "Vous entrez dans le jeu, bonne chance !");
cplayer.play();
}
} else {
if(item.getType() == Material.MAGMA_CREAM) {
cplayer.split();
} else if(item.getType() == Material.SLIME_BALL) {
cplayer.ejectMass();
} else if(item.getType() == Material.DIODE) {
MenuGui.display(player);
}
}
}
示例4: openStatsGUI
public void openStatsGUI(Player p){
inv = Bukkit.createInventory(null, 27, ChatColor.DARK_GRAY + "Stats");
/*List<String> armamentLore = new ArrayList();
armamentLore.add(ChatColor.BLUE + "Level: "+ ChatColor.GREEN + getArmamentHakiLevel(p.getName()));
armamentLore.add(ChatColor.BLUE + "XP: " + ChatColor.GREEN + getArmamentHakiXP(p.getName()));
armamentLore.add(ChatColor.BLUE + "XP Needed: " + ChatColor.GREEN + ((armamentHakiLevels[getArmamentHakiLevel(p.getName()) + 1])- (getArmamentHakiXP(p.getName()))));
List<String> observationLore = new ArrayList();
observationLore.add(ChatColor.BLUE + "Level: "+ ChatColor.GREEN + getObservationHakiLevel(p.getName()));
observationLore.add(ChatColor.BLUE + "XP: " + ChatColor.GREEN + getObservationHakiXP(p.getName()));
observationLore.add(ChatColor.BLUE + "XP Needed: " + ChatColor.GREEN + ((armamentHakiLevels[getObservationHakiLevel(p.getName()) + 1])- (getObservationHakiXP(p.getName()))));
List<String> conquerorLore = new ArrayList();
conquerorLore.add(ChatColor.BLUE + "Level: "+ ChatColor.GREEN + getConquerorHakiLevel(p.getName()));
conquerorLore.add(ChatColor.BLUE + "XP: " + ChatColor.GREEN + getConquerorHakiXP(p.getName()));
conquerorLore.add(ChatColor.BLUE + "XP Needed: " + ChatColor.GREEN + ((armamentHakiLevels[getConquerorHakiLevel(p.getName()) + 1])- (getConquerorHakiXP(p.getName()))));
*/
ItemStack skull = new ItemStack(Material.SKULL_ITEM, 1, (short) SkullType.PLAYER.ordinal());
ItemStack className = new ItemStack(Material.BOOK);
ItemMeta classNameMeta = className.getItemMeta();
ItemStack kills = new ItemStack(Material.IRON_SWORD);
ItemMeta killsMeta = kills.getItemMeta();
ItemStack deaths = new ItemStack(Material.BONE);
ItemMeta deathsMeta = deaths.getItemMeta();
ItemStack armament = new ItemStack(Material.IRON_INGOT);
ItemMeta armamentMeta = armament.getItemMeta();
ItemStack observation = new ItemStack(Material.NETHER_STAR);
ItemMeta observationMeta = observation.getItemMeta();
ItemStack conqueror = new ItemStack(Material.BLAZE_ROD);
ItemMeta conquerorMeta = observation.getItemMeta();
SkullMeta skullMeta = (SkullMeta) skull.getItemMeta();
skullMeta.setOwner(p.getName());
skullMeta.setDisplayName(ChatColor.GOLD + p.getName() + "'s Stats");
skull.setItemMeta(skullMeta);
classNameMeta.setDisplayName(ChatColor.GOLD + "Class: " + ChatColor.BLUE + Datafiles.getClass(p.getName()));
className.setItemMeta(classNameMeta);
killsMeta.setDisplayName(ChatColor.GOLD + "Kills: " + ChatColor.BLUE + Datafiles.getKills(p.getName()));
kills.setItemMeta(killsMeta);
deathsMeta.setDisplayName(ChatColor.GOLD + "Deaths: " + ChatColor.BLUE + Datafiles.getDeaths(p.getName()));
deaths.setItemMeta(deathsMeta);
armamentMeta.setDisplayName(ChatColor.GOLD + "Armament Haki");
// armamentMeta.setLore(armamentLore);
armament.setItemMeta(armamentMeta);
observationMeta.setDisplayName(ChatColor.GOLD + "Observation Haki");
//observationMeta.setLore(observationLore);
observation.setItemMeta(observationMeta);
conquerorMeta.setDisplayName(ChatColor.GOLD + "Conqueror Haki");
// conquerorMeta.setLore(conquerorLore);
conqueror.setItemMeta(conquerorMeta);
inv.setItem(0, skull);
inv.setItem(9, className);
inv.setItem(4, kills);
inv.setItem(13, deaths);
inv.setItem(8, armament);
inv.setItem(17, observation);
inv.setItem(26, conqueror);
p.openInventory(inv);
}
示例5: initialize
@Override
public void initialize() {
ItemStack aboutItem = new ItemStack(Material.SNOW_BALL);
aboutItem.addUnsafeEnchantment(Enchantment.DURABILITY, 1);
list.add(new MenuItem(5, 0, new ItemStack(Material.BOOK), ChatColor.AQUA + "Chat Hovers", new String[] {
ChatColor.GRAY + "Hover over people's names in chat to see more info about them.",
ChatColor.GRAY + "Click on player's names for information on their equipment and more!"
}, null));
list.add(new MenuItem(5, 2, new ItemStack(Material.BOOK), ChatColor.AQUA + "Item Rarities", new String[] {
ChatColor.GRAY + "The following is the order of Item Rarities in Zentrela (from most common to most rare).",
"",
ItemBalance.getRarityColor(0) + "Common",
ItemBalance.getRarityColor(1) + ItemBalance.getRarityName(1),
ItemBalance.getRarityColor(2) + ItemBalance.getRarityName(2),
ItemBalance.getRarityColor(3) + ItemBalance.getRarityName(3),
ItemBalance.getRarityColor(4) + ItemBalance.getRarityName(4),
ItemBalance.getRarityColor(5) + ItemBalance.getRarityName(5),
ItemBalance.getRarityColor(6) + ItemBalance.getRarityName(6),
}, null));
list.add(new MenuItem(5, 4, new ItemStack(Material.BOOK), ChatColor.AQUA + "Equipment Tiers", new String[] {
ChatColor.GRAY + "There are 5 tiers of equipment. Stronger monsters can drop higher tiered equipment.",
"",
ChatColor.GRAY + "Tier 1 - Recruit",
ChatColor.WHITE + "Tier 2 - Novice",
ChatColor.GREEN + "Tier 3 - Apprentice",
ChatColor.GOLD + "Tier 4 - Veteran",
ChatColor.AQUA + "Tier 5 - Expert"
}, null));
list.add(new MenuItem(5, 6, new ItemStack(Material.BOOK), ChatColor.AQUA + "Spellcasting", new String[] {
ChatColor.GRAY + "Spellcasting is a super important part of enjoying Zentrela, so we talk about it a lot!",
"",
ChatColor.GRAY + "There are 4 \"spellcasts\" which are used to actually cast your spells. These are RLL, RLR, RRL, and RRR.",
"",
ChatColor.WHITE + "To use a spellcast, just hold a weapon and click Right and Left on your mouse.",
"",
ChatColor.GRAY + "If you need more help, just type " + ChatColor.YELLOW + "!spells " + ChatColor.GRAY + "in chat for a useful video tutorial!",
}, null));
list.add(new MenuItem(5, 8, new ItemStack(Material.BOOK), ChatColor.AQUA + "Particles", new String[] {
ChatColor.GRAY + "Many spells and effects in Zentrela depend on particles.",
"",
ChatColor.GRAY + "Please turn on particles so that you can see spells from players and mobs! It's hard to fight things that are invisible."
}, null));
list.add(new MenuItem(0, 4, aboutItem, ChatColor.AQUA + "About Zentrela", new String[] {
ChatColor.GREEN + "Almost all of Zentrela's content is coded exclusively for the server! This means that we are always able to add and adjust features, since we write the code.",
"",
ChatColor.GRAY + "Check out our website at " + ChatColor.AQUA + "www.Zentrela.net" + ChatColor.GRAY + " to join the awesome community!",
"",
ChatColor.YELLOW + "The papers below have command details in ALPHABETICAL order for your convenience.",
}, null));
ItemStack orderItem = new ItemStack(Material.NETHER_STAR);
orderItem.addUnsafeEnchantment(Enchantment.DURABILITY, 1);
list.add(new MenuItem(0, 8, orderItem, ChatColor.AQUA + "Menu Help", new String[] {
ChatColor.GREEN + "The commands shown here are ordered alphabetically for your convenience!",
"",
ChatColor.GRAY + "Be sure to check out the full list of commands at the top left.",
"",
ChatColor.YELLOW + "Have fun in Zentrela!",
}, null));
list.addAll(HelpCommandsSingleton.generated);
list.addAll(HelpCommandsSingleton.fullListGenerated);
}