-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathconfig.go
18 lines (16 loc) · 952 Bytes
/
config.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package peex
import "github.com/df-mc/dragonfly/server"
// Config is a struct passed to the New function when creating a new Manager. It allows for customizing several aspects
// such as specifying handlers and component providers. Many of these cannot be modified after the manager has been
// created.
type Config struct {
// Logger allows for an optional logger to be supplied. This will log things such as errors when saving components
// when a player is leaving.
Logger server.Logger
// Handlers contains all the handlers that will run during the lifetime of the manager. These will always be active,
// but can be controlled through adding or removing components from users.
Handlers []Handler
// Providers allows for passing of a list of ComponentProviders which can load & save components for players at
// runtime. The providers must be wrapped in a ProviderWrapper using the WrapProvider function.
Providers []ComponentProvider
}