Skip to content

Commit

Permalink
Merge pull request #8 from ParadigmMC/dennis
Browse files Browse the repository at this point in the history
0.2.1
  • Loading branch information
TheAlan404 committed Jul 10, 2023
2 parents 3d0bed4 + 4d247e7 commit 2e15a72
Show file tree
Hide file tree
Showing 20 changed files with 875 additions and 130 deletions.
22 changes: 19 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "mcman"
version = "0.2.0"
version = "0.2.1"
edition = "2021"
authors = ["ParadigmMC"]
repository = "https://github.com/ParadigmMC/mcman"
Expand Down
144 changes: 130 additions & 14 deletions DOCS.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,22 @@ Index:

Here are a list of commands. You can type `mcman` or `mcman --help` for a basic list of it.

### `mcman init`
### `mcman init [--name <name>] [--mrpack <src>]`

Initializes a new server in the current directory.

Example:
This command is interactive. Just run `mcman init`!

The source is the same as one in [`mcman import mrpack`](#mcman-import-mrpack-src)

Example using [Adrenaserver](https://modrinth.com/modpack/adrenaserver):

```sh
# these are all identical
mcman init --mrpack mr:adrenaserver
mcman init --mrpack https://modrinth.com/modpack/adrenaserver
mcman init --mrpack https://cdn.modrinth.com/data/H9OFWiay/versions/2WXUgVhc/Adrenaserver-1.4.0%2B1.20.1.quilt.mrpack
```

### `mcman version`

Expand Down Expand Up @@ -72,6 +83,13 @@ Example render:

Imports a plugin or a mod from a url.

Supports:

- Modrinth
- Spigot
- Github (releases)
- If not those, will prompt with direct url or jenkins

Example usage:

```sh
Expand All @@ -80,6 +98,36 @@ mcman import url https://modrinth.com/plugin/imageframe
mcman import url https://www.spigotmc.org/resources/armorstandeditor-reborn.94503/
```

### `mcman import mrpack <src>`

Imports a [mrpack](https://docs.modrinth.com/docs/modpacks/format_definition/) file (modrinth modpacks)

**Note:** [`mcman init`](#mcman-init---name-name---mrpack-src) supports mrpacks

The source can be:

- A direct URL to a `.mrpack` file
- A local file path
- Modpack URL (`https://modrinth.com/modpack/{id}`)
- Modrinth project id prefixed with `mr:`

Example usages:

```sh
# direct link
mcman import mrpack https://cdn.modrinth.com/data/xldzprsQ/versions/xWFqQBjM/Create-Extra-full-1.1.0.mrpack
# only /modpack urls
mcman import mrpack https://modrinth.com/modpack/create-extra
# prefixed
mcman import mrpack mr:simply-skyblock
# local file
mcman import mrpack My-Pack.mrpack
```

### `mcman import customs`

Utility tool for re-importing all custom url downloadables in a server.

## Folder Structure

In a normal server environment, everything is in one folder and a big giant mess to navigate.
Expand Down Expand Up @@ -215,7 +263,7 @@ Default values aren't written back to config - except for `aikars_flags`, `proxy
disable = false # false by default
# adds your own args
jvm_args = "-Dhello=true"
jvm_args = "-exampleidk"
game_args = "--world abc"
# use aikar's flags
Expand All @@ -227,13 +275,20 @@ proxy_flags = false
# adds -Dcom.mojang.eula.agree=true
# therefore you agree to mojang's eula
# writes eula.txt when on fabric/quilt
eula_args = true
# adds --nogui to game args, should set to false on proxies...
# adds --nogui to game args
nogui = true
# specify -Xmx/-Xms (memory)
memory = "2048M"
# a table of properties
[launcher.properties]
hello="thing"
# ^ same as this:
# jvm_args = "-Dhello=thing"
```

## Types
Expand All @@ -244,11 +299,14 @@ Below are some types used in `server.toml`

A downloadable is some source of a plugin, mod or a server jar.

Index of types:
Index of sources:

- [Vanilla](#vanilla)
- [PaperMC](#papermc)
- [Fabric](#fabric)
- [Quilt](#quilt)
- [PaperMC](#papermc) (Paper, Waterfall and Velocity)
- [PurpurMC](#purpurmc)
- [BungeeCord](#bungeecord)
- [Modrinth](#modrinth)
- [Spigot](#spigot)
- [Github Releases](#github-releases)
Expand All @@ -263,20 +321,53 @@ Used for a vanilla server jar. Has no properties
type = "vanilla"
```

#### Fabric

The [Fabric](https://fabricmc.net/) mod loader

**Options:**

- `type` = `"fabric"`
- `installer`: string | `"latest"` - Installer version to use
- `loader`: string | `"latest"` - Loader version to use

```toml
type = "fabric"
installer = "latest"
loader = "latest"
```

#### Quilt

The [Quilt](https://quiltmc.org/) project - mod loader compatible with fabric

Due to some complexities with quilt, `mcman` will need to run `java` to install the quilt server jar - keep this in mind.

**Options:**

- `type` = `"quilt"`
- `installer`: string | `"latest"` - Installer version to use
- `loader`: string | `"latest"` - Loader version to use

```toml
type = "quilt"
installer = "latest"
loader = "latest"
```

#### PaperMC

Allows downloading a [PaperMC](https://papermc.io/) project.

**Options:**

- `type` = `papermc`
- `type` = `"papermc"`
- `project`: string - The project name
- `build`: string | `"latest"` - Optional

```toml
# Its recommended to use the shortcuts:
type = "paper"
type = "folia"
type = "waterfall"
type = "velocity"
Expand All @@ -286,7 +377,7 @@ project = "paper"
# Optionally define the build if you dont want to use the latest:
type = "papermc"
project = "folia"
project = "waterfall"
build = "17"
# Note: the shortcuts do not support the 'build' property
```
Expand All @@ -297,7 +388,7 @@ Downloads server jar from [PurpurMC](https://purpurmc.org/).

**Options:**

- `type` = `purpur`
- `type` = `"purpur"`
- `build`: string | `"latest"` - Optional

```toml
Expand All @@ -308,13 +399,31 @@ build = "10"
# if omitted, uses latest
```

#### BungeeCord

BungeeCord is just a shortcut to a [jenkins](#jenkins) downloadable:

```toml
type = "bungeecord"
```

If you'd like to get a specific build, use this:

```toml
type = "jenkins"
url = "https://ci.md-5.net"
job = "BungeeCord"
build = "latest"
artifact = "BungeeCord"
```

#### Modrinth

Downloads from [Modrinth](https://modrinth.com/)'s API

**Options:**

- `type` = `modrinth` | `mr`
- `type` = `"modrinth"` | `"mr"`
- `id`: string - id of the project or the slug
- `version`: string | `"latest"` - Version ID, `"latest"` not recommended

Expand All @@ -332,7 +441,7 @@ This uses [Spiget](https://spiget.org/)'s API.

**Options:**

- `type` = `spigot`
- `type` = `"spigot"`
- `id`: string - id of the project

You can find the ID of the resource in the URL:
Expand All @@ -355,7 +464,7 @@ Allows downloading from github releases

**Options:**

- `type` = `ghrel`
- `type` = `"ghrel"`
- `repo`: string - repository identifier, like `"ParadigmMC/mcman"`
- `tag`: string | `"latest"` - The tag of the release
- `asset`: string | `"first"` - The name of the asset (checks for inclusion)
Expand All @@ -376,7 +485,7 @@ Use a jenkins server

**Options:**

- `type` = `jenkins`
- `type` = `"jenkins"`
- `url`: string - url of the jenkins server
- `job`: string - The job
- `build`: string | `"latest"` - The build number to use
Expand All @@ -401,6 +510,13 @@ artifact = "first"

Allows you to download from a defined URL.

**Options:**

- `type` = `"url"`
- `url`: string - URL to the file
- `filename`: string? - Optional filename if you dont like the name from the url
- `desc`: string? - Optional description (shown in markdown tables)

```toml
[[mods]]
type = "url"
Expand Down
19 changes: 15 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,20 @@ Powerful Minecraft Server Manager CLI. Easily install jars (server, plugins & mo
- Always keep up to date with new serverjar builds!
- No more manually downloading jars - mcman auto updates them according to your `server.toml`
- Supports a variety of [sources](./DOCS.md#downloadable):
- Server jars:
- Servers:
- Vanilla
- PaperMC (Paper, Folia, Waterfall and Velocity)
- Fabric
- Quilt
- Paper
- PurpurMC
- Velocity
- Waterfall
- BungeeCord
- Plugins/Mods:
- Modrinth
- Spigot
- And even **Github Releases**, **Custom URL**s and **Jenkins!**
- Supports importing from [mrpack](./DOCS.md#mcman-import-mrpack-src)s!
- Bootstraps your server configuration files
- Allows you to use variables inside your config files
- Environment variables for secrets
Expand All @@ -37,6 +43,13 @@ View the [Documentation](./DOCS.md) here.

## Changelog

### `0.2.1`

- Added **Fabric** support.
- Added **Quilt** support.
- Added `mcman import mrpack` command.
- `mcman init` now supports mrpacks

### `0.2.0`

- Wrote more [documentation](./DOCS.md)
Expand All @@ -49,8 +62,6 @@ View the [Documentation](./DOCS.md) here.
- Supports modrinth, modrinth's cdn, github, spigot, jenkins and custom urls.
- Also wayy too interactive. For example, it'll ask for which release to use and suggest which asset to use. Similar thing in modrinth importing.
- Added **BungeeCord** support.
<!-- - Added **Fabric** support. -->
<!-- - Added **Quilt** support. -->
- Added **Jenkins** as a source.
- Impoved `mcman init` command. It now has a little wizard!
- Made mcman build look prettier
Expand Down
2 changes: 2 additions & 0 deletions res/default_readme
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

[![mcman badge](https://img.shields.io/badge/uses-mcman-purple?logo=github)](https://github.com/ParadigmMC/mcman)

<!-- run 'mcman md' to update! -->

<!--start:mcman-server-->
<!--end:mcman-server-->

Expand Down
Loading

0 comments on commit 2e15a72

Please sign in to comment.