    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        /**
    021         * Return the required permission level for this command.
    022         */
    023        public int getRequiredPermissionLevel()
    024        {
    025            return 2;
    026        }
    027
    028        public void processCommand(ICommandSender par1ICommandSender, String[] par2ArrayOfStr)
    029        {
    030            EntityPlayerMP var3 = getCommandSenderAsPlayer(par1ICommandSender);
    031            par1ICommandSender.sendChatToPlayer("Seed: " + var3.worldObj.getSeed());
    032        }
    033    }