    001    package net.minecraft.src;
    002
    003    import net.minecraft.server.MinecraftServer;
    004
    005    public class CommandShowSeed extends CommandBase
    006    {
    007        /**
    008         * Returns true if the given command sender is allowed to use this command.
    009         */
    010        public boolean canCommandSenderUseCommand(ICommandSender par1ICommandSender)
    011        {
    012            return MinecraftServer.getServer().isSinglePlayer() || super.canCommandSenderUseCommand(par1ICommandSender);
    013        }
    014
    015        public String getCommandName()
    016        {
    017            return "seed";
    018        }
    019
    020        public void processCommand(ICommandSender par1ICommandSender, String[] par2ArrayOfStr)
    021        {
    022            EntityPlayer var3 = getCommandSenderAsPlayer(par1ICommandSender);
    023            par1ICommandSender.sendChatToPlayer("Seed: " + var3.worldObj.getSeed());
    024        }
    025    }