Closed ajh123 closed 1 year ago
I originally thought it might of been the variable replacement thing, but after updating my templates to ...
Main
Version: '2.18a+'
Template:
Enabled: true
Internal: false
Icon: 'anvil'
Build:
Server-Type: 'Spigot'
Use-Cache: true
Require-Version: false
Can-Update: true
Update-Files: true
Update-Settings: true
Executable: 'bash build.sh'
Settings:
Executable: 'java -Xmx2048M -jar paper-1.19.4-538.jar --nogui'
Lobby
Version: '2.18a+'
Template:
Enabled: true
Icon: 'anvil'
Import:
- Main
Build:
Server-Type: 'Spigot'
Use-Cache: true
Require-Version: false
Can-Update: true
Update-Files: true
Update-Settings: true
Executable: 'bash build.sh'
Settings:
Executable: 'java -Xmx2048M -jar paper-1.19.4-538.jar --nogui'
Still no luck.
So, both of the properties you added actually belong under the Build
section of the config.
(Also, there's no need to launch an empty build script, you can just remove that line.)
(Same for the creation of the template cache folder that's going unused.)
As for your question, SubServers::template
would output the user-specified template name (Lobby
).
(Although, perhaps the actual server name (SubServers::name
) would be better for this use-case?)
(And, it seems there was actually a problem making replacements in parent-specified files. This is what the above commit fixed.)
Thanks that did solve the issue. Also the LuckPerms' "server" variable is used like a group like Lobby, so Lobby_1 and Lobby_2 will share the same permissions.,
Platform Information
Paste in the version information from the SubServers app in question here. To get this info, run the
/sub version
command where applicable or launch SubServers with the-v
argument. Make sure the app name matches the one you are reporting this bug for.What Happened
The server is unable to start because the
paper-1.19.4-538.jar
file is part of the Main template, which did not get copied to the Lobby server.How It Happened
I created two templates a "Main" one and a "Lobby" one. The lobby imports the main. Main template
Lobby template
In both templates the "build.sh" is just a simple
exit 0
because I already have thepaper-1.19.4-538.jar
inside the Main template's folder. Also the Main template contains other files like plugins and server.properties.When I run
/sub create Lobby_1 ~ Lobby
I expect it to copy the contents of the Main template first then the Lobby template before starting the server. Instead it look like only files in the Lobby template gets copied, so when the server starts the error:Lobby_1 > Error: Unable to access jarfile paper-1.19.4-538.jar
is produced because thepaper-1.19.4-538.jar
is found in the Main template.Additional Information
I was able to do this a long while ago, but I don't know when.