    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 int func_82362_a()
    021        {
    022            return 2;
    023        }
    024
    025        public void processCommand(ICommandSender par1ICommandSender, String[] par2ArrayOfStr)
    026        {
    027            EntityPlayerMP var3 = getCommandSenderAsPlayer(par1ICommandSender);
    028            par1ICommandSender.sendChatToPlayer("Seed: " + var3.worldObj.getSeed());
    029        }
    030    }