Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAlan404 committed Aug 6, 2023
1 parent 382522a commit 362828b
Show file tree
Hide file tree
Showing 11 changed files with 119 additions and 24 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Submit a PR or open an issue if you have a mcman-server repository that we can a

whats a semver? /s

### `0.3.1` (unreleased)
### `0.4.0` (unreleased)

- Added [NeoForge](https://neoforged.net/) server type
- Added [Forge](https://forums.minecraftforge.net/) server type
Expand Down
16 changes: 10 additions & 6 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@

# Installation

If you are a Windows user, we recommend **Scoop**.

=== "Github Releases"
You can use the links below to get the mcman executable.

[:fontawesome-brands-windows: Windows][latest-win]{ .md-button } [:fontawesome-brands-linux: OSX/Linux][latest-linux]{ .md-button }

[:simple-github: Github Releases Page](https://github.com/ParadigmMC/mcman/releases){ .md-button } [:simple-github: Build Action (nightly)](https://github.com/ParadigmMC/mcman/actions/workflows/build.yml){ .md-button }

We suggest you to add it to your `PATH` so you can run it from anywhere! (windows)

=== "Windows: scoop"
=== "Windows: Scoop"
Add the [minecraft](https://github.com/The-Simples/scoop-minecraft) bucket and install mcman:

```powershell
Expand All @@ -23,13 +23,17 @@
[Scoop](https://scoop.sh/) is a command-line installer for Windows. You can use 2 commands in powershell to install it. (4 commands in total to install mcman!)

=== "Linux: wget"
wget
Install to `/usr/bin` using `wget`:

```sh title="Install mcman"
```sh
wget https://github.com/ParadigmMC/mcman/releases/latest/download/mcman
sudo mv ./mcman /usr/bin/
sudo chmod +x /usr/bin/mcman
```

bottom text
=== "Cargo/Rust (compile from source)"
If you have rust installed:

```sh
cargo install --git https://github.com/ParadigmMC/mcman.git
```
12 changes: 9 additions & 3 deletions docs/reference/downloadable/github-releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,19 @@ Download something from GitHub Releases
type = "ghrel"
repo = "ViaVersion/ViaVersion"
tag = "4.7.0"
asset = "ViaVersion" #(1)!
asset = "ViaVersion-${tag}.jar" #(1)!
```

1. The real asset name is `ViaVersion-4.7.0.jar`.

!!! note
mcman checks for inclusion for the `asset` field, so the first asset with its filename containing `asset` (`"ViaVersion"` in the above example) will get downloaded. Use `"first"` to use the first asset which should be enough for most releases.
The strings can contain variable syntax:

- `${mcver}` or `${mcversion}` for the `mc_version` in [server.toml](../server.toml.md) (usable in `tag` and `asset`)
- `${tag}`, `${release}` or ${version} for the resolved github release version (usable in `asset`)

!!! note
For the `asset` field, its first checked if the given asset exists on the release. If it doesn't, it will pick the first asset whose filename contains the `asset` value

**Fields:**

Expand All @@ -22,4 +28,4 @@ Download something from GitHub Releases
| `type` | `"ghrel"` | |
| `repo` | string | Repository with its owner, like `"ParadigmMC/mcman"` |
| `tag` | string/`"latest"` | The 'tag' (version number in most cases) of the release |
| `asset` | string/`"first"` | The name of the asset (checks for inclusion) |
| `asset` | string/`"first"` | The name of the asset |
3 changes: 2 additions & 1 deletion docs/reference/downloadable/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Downloadable
# Downloadables

A `Downloadable` is a plugin, mod, datapack or any other thing that is, downloadable.

Expand All @@ -9,4 +9,5 @@ A `Downloadable` is a plugin, mod, datapack or any other thing that is, download
- [CurseRinth](./curserinth.md), curseforge api - `mods`
- [Github Releases](./github-releases.md) - `*`
- [Jenkins](./jenkins.md) - `*`
- [Maven](./maven.md) - `*`
- [Custom URL](./custom-url.md) - `*`
50 changes: 50 additions & 0 deletions docs/reference/downloadable/maven.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Maven

> Added in 0.4.0
Download from a [Maven](https://maven.apache.org/) instance.

**Fields:**

| Name | Type | Description |
| ---------- | --------- | ----------------------------- |
| `type` | `"maven"` | |
| `url` | string | URL to the Maven instance |
| `group` | string | The group, seperated with `.` |
| `artifact` | string | The name of the artifact |
| `version` | string | The version of the artifact |
| `filename` | string | Filename to download |

!!! note
The strings can contain variable syntax:

- `${mcver}` or `${mcversion}` for the `mc_version` in [server.toml](../server.toml.md)
- `${artifact}` for the resolved artifact (in `version` or `filename`)
- `${version}` for the resolved version (in `filename`)

!!! note
For the `version` field, its first checked if the given version exists on the artifact. If it doesn't, it will pick the first version that contains the contents of `version`

This is also true for the `filename` field

**For example:**

```md
Lets assume these are the versions and their files:

- 1.19.4-1.0.0
- amongus-1.19.4.jar
- amongus-1.19.4-extra-sus.jar
- 1.19.4-3.6.7
- 3.6.7.jar

And that:
- artifact: "amongus"
```

| `mc_version` | maven `version` | resolved version | maven `filename` | resolved filename |
| :----------- | :--------------- | :--------------- | :-------------------------- | :----------------------------- |
| `1.19.4` | `${mcver}-1.0.0` | `1.19.4-1.0.0` | `${artifact}-${mcver}.jar` | `amongus-1.19.4.jar` |
| `1.19.4` | `${mcver}` | `1.19.4-1.0.0` | `${artifact}-${mcver}-extr` | `amongus-1.19.4-extra-sus.jar` |
| `1.19.4` | `${mcver}-3` | `1.19.4-3.6.7` | `${version}.jar` | `3.6.7.jar` |

15 changes: 15 additions & 0 deletions docs/reference/servertype/forge.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Forge

Downloads the server jar from [Forge](https://forums.minecraftforge.net/)

**Fields:**

| Name | Type | Description |
| -------- | ----------------- | --------------------- |
| `type` | `"forge"` | |
| `loader` | string/`"latest"` | Loader version to use |

```toml
type = "forge"
loader = "latest"
```
6 changes: 4 additions & 2 deletions docs/reference/servertype/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Server Type
# Server Types

A server type is like a [Downloadable](../downloadable/index.md) but for server softwares.

Expand All @@ -8,8 +8,10 @@ A server type is like a [Downloadable](../downloadable/index.md) but for server
## Index

- [Vanilla](../servertype/vanilla.md)
- [Fabric](../servertype/fabric.md) - `modded`
- [Quilt](../servertype/quilt.md) - `modded`
- [Fabric](../servertype/fabric.md) - `modded`
- [NeoForge](../servertype/neoforge.md) - `modded`
- [Forge](../servertype/forge.md) - `modded`
- [PaperMC](../servertype/papermc.md)
- [Paper](../servertype/papermc.md#shortcuts) `bukkit`
- [Velocity](../servertype/papermc.md#shortcuts) `proxy`
Expand Down
15 changes: 15 additions & 0 deletions docs/reference/servertype/neoforge.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# NeoForge

Downloads the server jar from [NeoForge](https://neoforged.net/)

**Fields:**

| Name | Type | Description |
| -------- | ----------------- | --------------------- |
| `type` | `"neoforge"` | |
| `loader` | string/`"latest"` | Loader version to use |

```toml
type = "neoforge"
loader = "latest"
```
18 changes: 10 additions & 8 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,21 @@ nav:
- reference/servertype/vanilla.md
- reference/servertype/fabric.md
- reference/servertype/quilt.md
- reference/servertype/neoforge.md
- reference/servertype/forge.md
- reference/servertype/papermc.md
- reference/servertype/purpurmc.md
- reference/servertype/bungeecord.md
- reference/servertype/buildtools.md
- Downloadable:
- reference\downloadable\index.md
- reference\downloadable\modrinth.md
- reference\downloadable\curserinth.md
- reference\downloadable\spigot.md
- reference\downloadable\github-releases.md
- reference\downloadable\jenkins.md
- reference\downloadable\custom-url.md
- reference/downloadable/index.md
- reference/downloadable/modrinth.md
- reference/downloadable/curserinth.md
- reference/downloadable/spigot.md
- reference/downloadable/github-releases.md
- reference/downloadable/jenkins.md
- reference/downloadable/maven.md
- reference/downloadable/custom-url.md
theme:
name: material
icon:
Expand All @@ -60,7 +63,6 @@ theme:
- navigation.tracking
- navigation.tabs
- navigation.path
- navigation.indexes
- content.code.copy
- content.code.annotate
markdown_extensions:
Expand Down
2 changes: 1 addition & 1 deletion src/model/servertype/interactive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ impl ServerType {
let items = [
(0, "Quilt (fabric compatible)"),
(1, "Fabric"),
(2, "NeoForged (forge compatible)"),
(2, "NeoForge (forge compatible)"),
(3, "Forge"),
];

Expand Down
4 changes: 2 additions & 2 deletions src/model/servertype/meta.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ impl ServerType {
Self::PaperMC { .. } => "PaperMC".to_owned(),
Self::Quilt { .. } => "Quilt".to_owned(),
Self::BuildTools { .. } => "BuildTools".to_owned(),
Self::NeoForge { .. } => "NeoForged".to_owned(),
Self::NeoForge { .. } => "NeoForge".to_owned(),
Self::Forge { .. } => "Forge".to_owned(),
Self::Downloadable { inner } => inner.get_type_name(),
}
Expand All @@ -39,7 +39,7 @@ impl ServerType {
format!("[PaperMC/{project}](https://github.com/PaperMC/{project}); build {build}")
}
Self::Quilt { .. } => "[Quilt](https://quiltmc.org/)".to_owned(),
Self::NeoForge { .. } => "[NeoForged](https://neoforged.net/)".to_owned(),
Self::NeoForge { .. } => "[NeoForge](https://neoforged.net/)".to_owned(),
Self::Forge { .. } => "[Forge](https://forums.minecraftforge.net/)".to_owned(),
Self::Downloadable { inner } => inner.get_md_link(),
}
Expand Down

0 comments on commit 362828b

Please sign in to comment.