Resources: Difference between revisions

620 bytes added ,  12 August 2021
no edit summary
No edit summary
No edit summary
Line 5: Line 5:


== Using resources ==
== Using resources ==
Place the resource in your server's "resources" folder. Then, open the [[ServerConfiguration|server config]] (default is server.xml) in Notepad or your preferred code editor, and find the <code><resources></code> section. Add resources by inserting a new line containing the resource: <code><resource src="something" /></code>. This new line must be '''inside''' the resources section. Here's an example:
Place the resource in your server's "resources" folder. To make the resource automatically start when running the server, open the [[ServerConfiguration|server config]] (default is server.xml) in Notepad or your preferred code editor, and find the <code><resources></code> section. Add resources by inserting a new line containing the resource: <code><resource src="something" /></code>. This new line must be '''inside''' the resources section. Here's an example:
{{XMLCode|1=<resources>
{{XMLCode|1=<resources>
<resource src="something"/>
<resource src="something"/>
<resource src="something-else" />
<resource src="something-else" />
</resources>}}
</resources>}}
You can also start, stop, restart and refresh resources without restarting the server. To do this, type one of the commands (start, stop, refresh, or restart) in the server console. Example: <code>start something</code>. The refresh command is needed when you're finished editing a resource because the server loads all resources into memory so any edits won't have any effect until you use the refresh command. You can also use these commands in game, if your [[client.administrator|client.administrator]] is set to true (any running resource can set this).




2,591

edits