    001    package net.minecraft.src;
    002
    003    import net.minecraft.server.MinecraftServer;
    004
    005    public class CommandServerPublishLocal extends CommandBase
    006    {
    007        public String getCommandName()
    008        {
    009            return "publish";
    010        }
    011
    012        /**
    013         * Return the required permission level for this command.
    014         */
    015        public int getRequiredPermissionLevel()
    016        {
    017            return 4;
    018        }
    019
    020        public void processCommand(ICommandSender par1ICommandSender, String[] par2ArrayOfStr)
    021        {
    022            String var3 = MinecraftServer.getServer().shareToLAN(EnumGameType.SURVIVAL, false);
    023
    024            if (var3 != null)
    025            {
    026                notifyAdmins(par1ICommandSender, "commands.publish.started", new Object[] {var3});
    027            }
    028            else
    029            {
    030                notifyAdmins(par1ICommandSender, "commands.publish.failed", new Object[0]);
    031            }
    032        }
    033    }