public static void setVale(Player player, int amount) throws SQLException {
UUID uuid = player.getUniqueId();
PreparedStatement stmt = plugin.getDb().getConnection().prepareStatement("UPDATE vale_eco SET amount = "+amount+" WHERE uuid = '"+uuid.toString()+"'");
stmt.executeUpdate();
ItemStack item = new ItemStack(Material.EMERALD, 1);
ItemMeta meta = item.getItemMeta();
meta.setDisplayName(ChatColor.GREEN.toString() + getVale(player) + (getVale(player)==1?" Vale":" Vales"));
meta.addEnchant(Enchantment.LUCK, 1, true);
meta.addItemFlags(ItemFlag.HIDE_ENCHANTS);
item.setItemMeta(meta);
if(plugin.getConfig().getString("valeitemininv").equals("true")){
player.getInventory().setItem(8, item);
}
}
ValeUtil.java 文件源码
java
阅读 20
收藏 0
点赞 0
评论 0
项目:NetworkCore
作者:
评论列表
文章目录