You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
noTargetConnectionFoundMessage = "<color:#dc2626>Couldn't connect you to the network because no target servers are available."
@@ -12,4 +12,104 @@ data class Config(
12
12
noTargetConnectionFoundMessage = "<color:#dc2626>You have been disconnected from the network since you have been kicked and no fallback server are available."
13
13
),
14
14
valcommands:List<CommandConfig> = emptyList(),
15
-
)
15
+
) {
16
+
companionobject {
17
+
funcreateDefaultConfig(): Config {
18
+
val defaultConnections =listOf(
19
+
ConnectionConfig(
20
+
name ="lobby",
21
+
serverNameMatcher =MatcherConfig(
22
+
operation =MatcherOperation.STARTS_WITH,
23
+
value ="lobby"
24
+
)
25
+
),
26
+
ConnectionConfig(
27
+
name ="hub",
28
+
serverNameMatcher =MatcherConfig(
29
+
operation =MatcherOperation.STARTS_WITH,
30
+
value ="hub"
31
+
)
32
+
),
33
+
ConnectionConfig(
34
+
name ="premium-lobby",
35
+
serverNameMatcher =MatcherConfig(
36
+
operation =MatcherOperation.STARTS_WITH,
37
+
value ="premium"
38
+
),
39
+
rules =listOf(
40
+
RulesConfig(
41
+
type =RulesConfig.Type.PERMISSION,
42
+
name ="simplecloud.connection.premium",
43
+
value ="true",
44
+
)
45
+
)
46
+
),
47
+
ConnectionConfig(
48
+
name ="vip-lobby",
49
+
serverNameMatcher =MatcherConfig(
50
+
operation =MatcherOperation.STARTS_WITH,
51
+
value ="vip"
52
+
),
53
+
rules =listOf(
54
+
RulesConfig(
55
+
type =RulesConfig.Type.PERMISSION,
56
+
name ="simplecloud.connection.vip",
57
+
value ="true",
58
+
)
59
+
)
60
+
),
61
+
ConnectionConfig(
62
+
name ="silent-lobby",
63
+
serverNameMatcher =MatcherConfig(
64
+
operation =MatcherOperation.STARTS_WITH,
65
+
value ="silent"
66
+
),
67
+
rules =listOf(
68
+
RulesConfig(
69
+
type =RulesConfig.Type.PERMISSION,
70
+
name ="simplecloud.connection.silent",
71
+
value ="true",
72
+
)
73
+
)
74
+
)
75
+
)
76
+
77
+
val defaultTargetConnections =listOf(
78
+
TargetConnectionConfig("lobby", 0),
79
+
TargetConnectionConfig("hub", 0),
80
+
TargetConnectionConfig("premium-lobby", 10),
81
+
TargetConnectionConfig("vip-lobby", 20),
82
+
TargetConnectionConfig("silent-lobby", 20)
83
+
)
84
+
85
+
val networkJoinTargets =TargetsConfig(
86
+
enabled =true,
87
+
noTargetConnectionFoundMessage ="<color:#dc2626>Couldn't connect you to the network because\nno target servers are available.",
88
+
targetConnections = defaultTargetConnections
89
+
)
90
+
91
+
val fallbackConnectionsConfig =TargetsConfig(
92
+
enabled =true,
93
+
noTargetConnectionFoundMessage ="<color:#dc2626>You have been disconnected from the network\nbecause there are no fallback servers available.",
94
+
targetConnections = defaultTargetConnections
95
+
)
96
+
97
+
val defaultCommands =listOf(
98
+
CommandConfig(
99
+
name ="lobby",
100
+
alreadyConnectedMessage ="<color:#dc2626>You are already connected to this lobby!",
101
+
noTargetConnectionFound ="<color:#dc2626>Couldn't find a target server!",
Copy file name to clipboardExpand all lines: connection-velocity/src/main/kotlin/app/simplecloud/plugin/connection/velocity/VelocityServerConnectionPlugin.kt
0 commit comments