paper

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 13, 2026 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package paper provides client for PaperMC API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildInfo

type BuildInfo struct {
	// Version is the Minecraft version.
	Version string
	// Build is the build number.
	Build int
	// DownloadURL is the URL to download this build.
	DownloadURL string
	// SHA256 is the checksum of the JAR file.
	SHA256 string
}

BuildInfo contains information about a Paper build.

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client provides access to PaperMC API using goPaperMC library.

func NewClient

func NewClient() *Client

NewClient creates a new Paper API client.

func (*Client) DownloadPaperJAR

func (c *Client) DownloadPaperJAR(ctx context.Context, version, targetPath string) error

DownloadPaperJAR downloads Paper JAR to the specified path.

func (*Client) GetBuilds

func (c *Client) GetBuilds(ctx context.Context, version string) ([]int, error)

GetBuilds retrieves all build numbers for a specific Paper version. Returns a slice of build numbers in ascending order.

func (*Client) GetPaperBuild

func (c *Client) GetPaperBuild(ctx context.Context, version string) (*BuildInfo, error)

GetPaperBuild retrieves build information for a specific Paper version. Returns the latest build for the given version.

func (*Client) GetPaperVersions

func (c *Client) GetPaperVersions(ctx context.Context) ([]string, error)

GetPaperVersions retrieves all available Paper versions.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL