Documentation
¶
Overview ¶
Package paper provides client for PaperMC API.
Index ¶
- type BuildInfo
- type Client
- func (c *Client) DownloadPaperJAR(ctx context.Context, version, targetPath string) error
- func (c *Client) GetBuilds(ctx context.Context, version string) ([]int, error)
- func (c *Client) GetPaperBuild(ctx context.Context, version string) (*BuildInfo, error)
- func (c *Client) GetPaperVersions(ctx context.Context) ([]string, error)
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 (*Client) DownloadPaperJAR ¶
DownloadPaperJAR downloads Paper JAR to the specified path.
func (*Client) GetBuilds ¶
GetBuilds retrieves all build numbers for a specific Paper version. Returns a slice of build numbers in ascending order.
func (*Client) GetPaperBuild ¶
GetPaperBuild retrieves build information for a specific Paper version. Returns the latest build for the given version.
Click to show internal directories.
Click to hide internal directories.