DeathSignListener.java 文件源码

java
阅读 31 收藏 0 点赞 0 评论 0

项目:HCFCore 作者:
/**
 * Generates a death-sign for a player and killer.
 *
 * @param playerName
 *            the name of the player killed
 * @param killerName
 *            the name of the killer of player
 * @return the death sign featuring the victim and murderer
 */
public static ItemStack getDeathSign(String playerName, String killerName) {
    ItemStack stack = new ItemStack(Material.SIGN, 1);
    ItemMeta meta = stack.getItemMeta();
    meta.setDisplayName(DEATH_SIGN_ITEM_NAME);
    meta.setLore(Lists.newArrayList(ChatColor.RED + playerName, ChatColor.DARK_RED + "slain by", ChatColor.GREEN + killerName,
            DateTimeFormats.DAY_MTH_HR_MIN_SECS.format(System.currentTimeMillis())));
    stack.setItemMeta(meta);
    return stack;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号