本文整理汇总了Java中org.bukkit.Material.SULPHUR属性的典型用法代码示例。如果您正苦于以下问题:Java Material.SULPHUR属性的具体用法?Java Material.SULPHUR怎么用?Java Material.SULPHUR使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.bukkit.Material
的用法示例。
在下文中一共展示了Material.SULPHUR属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setScraps
public static void setScraps(Player player, int amount) throws SQLException {
UUID uuid = player.getUniqueId();
PreparedStatement stmt = plugin.getDb().getConnection().prepareStatement("UPDATE scraps_eco SET amount = " + amount + " WHERE uuid = '" + uuid.toString() + "'");
stmt.executeUpdate();
ItemStack item = new ItemStack(Material.SULPHUR, 1);
ItemMeta meta = item.getItemMeta();
meta.setDisplayName(ChatColor.GREEN.toString() + getScraps(player) + (getScraps(player) == 1 ? " Scrap" : " Scraps"));
meta.addEnchant(Enchantment.LUCK, 1, true);
meta.addItemFlags(ItemFlag.HIDE_ENCHANTS);
item.setItemMeta(meta);
player.getInventory().setItem(8, item);
}
示例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;
}