From 539f28549af8b4aafe2948264359e5d60ce8674b Mon Sep 17 00:00:00 2001 From: kwteh Date: Fri, 14 Feb 2014 13:54:30 +0800 Subject: [PATCH] The Lie. --- .../StevenLawson/TotalFreedomMod/Commands/Command_cake.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_cake.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_cake.java index 3402431..43e705e 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_cake.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_cake.java @@ -18,6 +18,10 @@ public class Command_cake extends TFM_Command @Override public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole) { + ItemStack C = new ItemStack(Material.CAKE); + ItemMeta CM = C.getItemMeta(); + CM.setDisplayName((new StringBuilder()).append(ChatColor.WHITE).append("The ").append(ChatColor.BLACK).append("Lie").toString()); + C.setItemMeta(CM); StringBuilder output = new StringBuilder(); Random randomGenerator = new Random(); @@ -30,7 +34,7 @@ public class Command_cake extends TFM_Command for (Player player : server.getOnlinePlayers()) { - ItemStack heldItem = new ItemStack(Material.CAKE, 1); + ItemStack heldItem = new ItemStack(C); player.getInventory().setItem(player.getInventory().firstEmpty(), heldItem); player.awardAchievement(Achievement.MINE_WOOD); player.awardAchievement(Achievement.BUILD_WORKBENCH);