mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 01:05:38 +00:00
Oops...
the best i can came up with
This commit is contained in:
parent
539f28549a
commit
302b538a3a
@ -10,6 +10,7 @@ import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.ItemMeta;
|
||||
|
||||
@CommandPermissions(level = AdminLevel.SUPER, source = SourceType.BOTH)
|
||||
@CommandParameters(description = "For the people that are still alive.", usage = "/<command>")
|
||||
@ -18,10 +19,7 @@ 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();
|
||||
|
||||
@ -34,7 +32,10 @@ public class Command_cake extends TFM_Command
|
||||
|
||||
for (Player player : server.getOnlinePlayers())
|
||||
{
|
||||
ItemStack heldItem = new ItemStack(C);
|
||||
ItemStack heldItem = new ItemStack(Material.CAKE);
|
||||
ItemMeta CM = heldItem.getItemMeta();
|
||||
CM.setDisplayName((new StringBuilder()).append(ChatColor.WHITE).append("The ").append(ChatColor.BLACK).append("Lie").toString());
|
||||
heldItem.setItemMeta(CM);
|
||||
player.getInventory().setItem(player.getInventory().firstEmpty(), heldItem);
|
||||
player.awardAchievement(Achievement.MINE_WOOD);
|
||||
player.awardAchievement(Achievement.BUILD_WORKBENCH);
|
||||
|
Loading…
Reference in New Issue
Block a user