forked from minekube/gate-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgate.go
27 lines (24 loc) · 866 Bytes
/
gate.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package main
import (
"github.com/minekube/gate-plugin-template/plugins/supaauth"
"go.minekube.com/gate/cmd/gate"
"go.minekube.com/gate/pkg/edition/java/proxy"
)
// It's a normal Go program, we only need
// to register our plugins and execute Gate.
func main() {
// Here we register our plugins with the proxy.
proxy.Plugins = append(proxy.Plugins,
// We have some demo plugins in the plugins/ directory,
// but you can also import your own plugins from other repositories.
//
// Checkout https://github.com/minekube/awesome for some inspiration.
supaauth.Plugin,
// Add more plugins as you like.
// They will be initialized in the same order as appended.
)
// Simply execute Gate as if it was a normal Go program.
// Gate will take care of everything else for us,
// such as config auto-reloading and flags like --debug.
gate.Execute()
}