Skip to content

Commit 07f0c41

Browse files
committed
Add more seeders for bungeecord and sponge
1 parent 14211bd commit 07f0c41

File tree

1 file changed

+86
-1
lines changed

1 file changed

+86
-1
lines changed

database/seeds/MinecraftServiceTableSeeder.php

Lines changed: 86 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,37 @@ private function addCoreOptions()
8686
'executable' => null,
8787
'startup' => '-Xms128M -Xmx{{SERVER_MEMORY}}M -Djline.terminal=jline.UnsupportedTerminal -jar {{SERVER_JARFILE}}'
8888
]);
89+
90+
$this->option['sponge'] = Models\ServiceOptions::create([
91+
'parent_service' => $this->service->id,
92+
'name' => 'Sponge (SpongeVanilla)',
93+
'description' => 'SpongeVanilla is the SpongeAPI implementation for Vanilla Minecraft.',
94+
'tag' => 'spigot',
95+
'docker_image' => 'quay.io/pterodactyl/minecraft:sponge',
96+
'executable' => null,
97+
'startup' => null
98+
]);
99+
100+
$this->option['bungeecord'] = Models\ServiceOptions::create([
101+
'parent_service' => $this->service->id,
102+
'name' => 'Bungeecord',
103+
'description' => 'For a long time, Minecraft server owners have had a dream that encompasses a free, easy, and reliable way to connect multiple Minecraft servers together. BungeeCord is the answer to said dream. Whether you are a small server wishing to string multiple game-modes together, or the owner of the ShotBow Network, BungeeCord is the ideal solution for you. With the help of BungeeCord, you will be able to unlock your community\'s full potential.',
104+
'tag' => 'bungeecord',
105+
'docker_image' => 'quay.io/pterodactyl/minecraft:bungeecord',
106+
'executable' => null,
107+
'startup' => null
108+
]);
89109
}
90110

91111
private function addVariables()
112+
{
113+
$this->addVanillaVariables();
114+
$this->addSpigotVariables();
115+
$this->addSpongeVariables();
116+
$this->addBungeecordVariables();
117+
}
118+
119+
private function addVanillaVariables()
92120
{
93121
Models\ServiceVariables::create([
94122
'option_id' => $this->option['vanilla']->id,
@@ -105,15 +133,18 @@ private function addVariables()
105133
Models\ServiceVariables::create([
106134
'option_id' => $this->option['vanilla']->id,
107135
'name' => 'Server Jar File',
108-
'description' => 'The version of Minecraft Vanilla to install. Use "latest" to install the latest version..',
136+
'description' => 'The version of Minecraft Vanilla to install. Use "latest" to install the latest version.',
109137
'env_variable' => 'VANILLA_VERSION',
110138
'default_value' => 'latest',
111139
'user_viewable' => 1,
112140
'user_editable' => 1,
113141
'required' => 1,
114142
'regex' => '/^(latest|[a-zA-Z0-9_\.-]{5,6})$/'
115143
]);
144+
}
116145

146+
private function addSpigotVariables()
147+
{
117148
Models\ServiceVariables::create([
118149
'option_id' => $this->option['spigot']->id,
119150
'name' => 'Server Jar File',
@@ -150,4 +181,58 @@ private function addVariables()
150181
'regex' => '/^(.*)$/'
151182
]);
152183
}
184+
185+
private function addSpongeVariables()
186+
{
187+
Models\ServiceVariables::create([
188+
'option_id' => $this->option['sponge']->id,
189+
'name' => 'Sponge Version',
190+
'description' => 'The version of SpongeVanilla to download and use.',
191+
'env_variable' => 'SPONGE_VERSION',
192+
'default_value' => '1.8.9-4.2.0-BETA-351',
193+
'user_viewable' => 1,
194+
'user_editable' => 0,
195+
'required' => 1,
196+
'regex' => '/^(.*)$/'
197+
]);
198+
199+
Models\ServiceVariables::create([
200+
'option_id' => $this->option['sponge']->id,
201+
'name' => 'Server Jar File',
202+
'description' => 'The name of the Jarfile to use when running SpongeVanilla.',
203+
'env_variable' => 'SERVER_JARFILE',
204+
'default_value' => 'server.jar',
205+
'user_viewable' => 1,
206+
'user_editable' => 1,
207+
'required' => 1,
208+
'regex' => '/^([\w\d._-]+)(\.jar)$/'
209+
]);
210+
}
211+
212+
private function addBungeecordVariables()
213+
{
214+
Models\ServiceVariables::create([
215+
'option_id' => $this->option['bungeecord']->id,
216+
'name' => 'Bungeecord Version',
217+
'description' => 'The version of Bungeecord to download and use.',
218+
'env_variable' => 'BUNGE_VERSION',
219+
'default_value' => 'latest',
220+
'user_viewable' => 1,
221+
'user_editable' => 1,
222+
'required' => 1,
223+
'regex' => '/^(latest|[\d]{3,5})$/'
224+
]);
225+
226+
Models\ServiceVariables::create([
227+
'option_id' => $this->option['bungeecord']->id,
228+
'name' => 'Bungeecord Jar File',
229+
'description' => 'The name of the Jarfile to use when running Bungeecord.',
230+
'env_variable' => 'SERVER_JARFILE',
231+
'default_value' => 'bungeecord.jar',
232+
'user_viewable' => 1,
233+
'user_editable' => 1,
234+
'required' => 1,
235+
'regex' => '/^([\w\d._-]+)(\.jar)$/'
236+
]);
237+
}
153238
}

0 commit comments

Comments
 (0)