Skip to content

Commit

Permalink
server provider
Browse files Browse the repository at this point in the history
  • Loading branch information
nothub committed Sep 10, 2022
1 parent 4e313c9 commit d79d842
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 36 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Use "mrpack-install [command] --help" for more information about a command.
Download and configure one of several Minecraft server flavors.
Usage:
mrpack-install server (vanilla | fabric | quilt | forge | paper | spigot) [flags]
mrpack-install server (vanilla | fabric | quilt | forge | paper) [flags]
Examples:
mrpack-install server fabric --server-dir fabric-srv
Expand Down
4 changes: 2 additions & 2 deletions cmd/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ func init() {
}

var serverCmd = &cobra.Command{
Use: "server (vanilla | fabric | quilt | forge | paper | spigot)",
Use: "server (vanilla | fabric | quilt | forge | paper)",
Short: "Prepare a plain server environment",
Long: `Download and configure one of several Minecraft server flavors.`,
Example: ` mrpack-install server fabric --server-dir fabric-srv
mrpack-install server paper --minecraft-version 1.18.2 --server-file srv.jar`,
Args: cobra.ExactValidArgs(1),
ValidArgs: []string{"vanilla", "fabric", "quilt", "forge", "paper", "spigot"},
ValidArgs: []string{"vanilla", "fabric", "quilt", "forge", "paper"},
Run: func(cmd *cobra.Command, args []string) {
minecraftVersion, err := cmd.Flags().GetString("minecraft-version")
if err != nil {
Expand Down
1 change: 0 additions & 1 deletion server/paper.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (

type Paper struct {
MinecraftVersion string
PaperVersion string
}

func (provider *Paper) Provide(serverDir string, serverFile string) error {
Expand Down
6 changes: 0 additions & 6 deletions server/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,6 @@ func NewProvider(flavor string, minecraftVersion string, flavorVersion string) (
case "paper":
provider = &Paper{
MinecraftVersion: minecraftVersion,
PaperVersion: flavorVersion,
}
case "spigot":
provider = &Spigot{
MinecraftVersion: minecraftVersion,
SpigotVersion: flavorVersion,
}
}

Expand Down
26 changes: 0 additions & 26 deletions server/spigot.go

This file was deleted.

0 comments on commit d79d842

Please sign in to comment.