本文整理匯總了Java中org.bukkit.Material.MAGMA_CREAM屬性的典型用法代碼示例。如果您正苦於以下問題:Java Material.MAGMA_CREAM屬性的具體用法?Java Material.MAGMA_CREAM怎麽用?Java Material.MAGMA_CREAM使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類org.bukkit.Material
的用法示例。
在下文中一共展示了Material.MAGMA_CREAM屬性的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: 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);
}
}
}
示例2: isBrewingIngredient
private static boolean isBrewingIngredient(ItemStack item) {
if (item.getType() == Material.NETHER_STALK) {
return true;
}
if (item.getType() == Material.SPECKLED_MELON) {
return true;
}
if (item.getType() == Material.GHAST_TEAR) {
return true;
}
if (item.getType() == Material.RABBIT_FOOT) {
return true;
}
if (item.getType() == Material.BLAZE_POWDER) {
return true;
}
if (item.getType() == Material.SPIDER_EYE) {
return true;
}
if (item.getType() == Material.SUGAR) {
return true;
}
if (item.getType() == Material.MAGMA_CREAM) {
return true;
}
if (item.getType() == Material.GLOWSTONE_DUST) {
return true;
}
if (item.getType() == Material.REDSTONE) {
return true;
}
if (item.getType() == Material.FERMENTED_SPIDER_EYE) {
return true;
}
if (item.getType() == Material.GOLDEN_CARROT) {
return true;
}
if (item.getType() == Material.RAW_FISH && item.getData().getData() == 3) {
return true;
}
if (item.getType() == Material.SULPHUR) {
return true;
}
return false;
}