-
-
Notifications
You must be signed in to change notification settings - Fork 30
/
shared.go
37 lines (31 loc) · 779 Bytes
/
shared.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
28
29
30
31
32
33
34
35
36
37
package main
import (
"fmt"
"os"
)
const (
// @deprecated use utils.DefaultJavaPort instead
DefaultJavaPort uint16 = 25565
// @deprecated use utils.DefaultBedrockPort instead
DefaultBedrockPort uint16 = 19132
)
// @deprecated use utils.ServerEdition instead
type ServerEdition string
const (
// @deprecated use utils.JavaEdition instead
JavaEdition ServerEdition = "java"
// @deprecated use utils.BedrockEdition instead
BedrockEdition ServerEdition = "bedrock"
)
// @deprecated use utils.ServerEdition instead
func ValidEdition(v string) bool {
switch ServerEdition(v) {
case JavaEdition, BedrockEdition:
return true
}
return false
}
// @deprecated use utils.PrintUsageError instead
func printUsageError(msg string) {
_, _ = fmt.Fprintln(os.Stderr, msg)
}