Setting up a Server: Difference between revisions

From BTA-Mirror
imported>Ttv pedro270707
mNo edit summary
imported>Ttv pedro270707
mNo edit summary
Line 3: Line 3:


== Generating the server files ==
== Generating the server files ==
To generate the server's files, it is necessary to have a server <code>jar</code> of the desired game version. Usually, server jars can be found in the #announcements channel of the official Better than Adventure! Discord server. In this channel, the latest version or snapshot can be found, and a "download server jar" link can be clicked in the list of links. It should be noted that snapshots often do not have a server jar due to their instability and subjectness to change.


First off. In the #update-announcements channel in the official discord server, find the latest version or snapshot and click the "download server jar" link in the list of links. (note that snapshots often don't have a server jar due to their instability and subjectness to change). When the file is done downloading, place it in its own folder, the server makes a bunch of files in the same folder/directory it is in. Once you've got the file in a directory, double-click the file to run it. A window should open.  
After downloading the server <code>jar</code> file, it should be placed in its own folder. The server will create a bunch of files in the same folder or directory as the <code>jar</code> file. Once the file is in its directory, double-click the file to run it. This should open a window, allowing for the creation and management of a Better than Adventure! server.
[[File:New Server.png|thumb|The server window just opened up.]]
[[File:New Server.png|thumb|The server window that appears when a server is opened.]]


Once the server is done loading, it should say something like [INFO] Done (67616565924ns)! For help, type "help" or "?". Then you should have it all set up.
Once the server is done loading, its window should contain a message similar to the following:
<pre>[INFO] Done (67616565924ns)! For help, type "help" or "?"</pre>


== Playing the server ==
== Playing the server ==
Now that the server is running, it is possible to join it by opening an instance of the respective version of Better than Adventure! and typing "<code>localhost</code>" into the server IP textbox. If all steps are followed correctly, the player should be loaded into the world.
[[File:IP address.png|thumb|The server screen. Note that <code>localhost</code> is written in the textbox, which should load the player into the world.]]
[[File:Screenshot from 2021-12-10 10-32-13.png|thumb|The randomly generated world created.]]


Now that you have a working server. You can join it by opening bta and typing localhost into the server IP textbox. if you did it right, you should load into the world.
== Customizing the server ==
[[File:IP address.png|thumb|I hope this works...]]
After the server has been set up, the server can be customized by editing various configuration files.
[[File:Screenshot from 2021-12-10 10-32-13.png|thumb|Your very own BTA server. Ready for action.]]
=== <code>server.properties</code> ===
The most important file to adjust is <code>server.properties</code>, which includes multiple adjustable parameters that can be tailored to meet the needs of players. Below is a table of the parameters with their respective default values and explanations:


==== Customising the server ====
{| class="wikitable"
Now its time for the nitty gritty.
!Parameter!!Default value!!Note
 
|-
===== server.properties =====
|<code>mob-griefing</code>||<code>false</code>||If set to <code>true</code>, allows mobs to modify blocks. If set to <code>false</code>, mobs cannot modify blocks (e.g. creepers cannot destroy tiles on explosions).
 
|-
Once your server is all set up, you can tweak the server how you wish. The first and foremost file to edit is server.properties.
|<code>allow-nether</code>||<code>true</code>||If set to <code>true</code>, players can access the Nether dimension by building a Nether portal. If set to <code>false</code>, players cannot access the Nether dimension.
 
|-
Here is an explanation of each line of the file.
|<code>level-name</code>||world||Sets the name of the world that is generated when the server is started. By default, the name is set to "world". If you want to change the name, you can edit this parameter.
 
|-
 
|<code>world-type</code>||<code>extended</code>||Determines the type of world that is generated when the server is started. By default, the world type is set to <code>extended</code>, which generates a world with more varied terrain than the default world type.
level-name: this is set to "world" by default. The only reason to change this is if you want to have a flashy name for the server's world if you play it on singleplayer.
|-
 
|<code>allow-flight</code>||<code>false</code>||If set to <code>true</code>, players are allowed to fly using creative mode or special abilities. If set to <code>false</code>, players cannot fly.
view-distance: Determines the view distance limit for players
|-
 
|<code>server-port</code>||<code>25565</code>||Sets the port number that the server listens on for incoming connections. The default value is <code>25565</code>. Most users will not need to change this value, but it may be necessary to change it if there are port conflicts with other applications running on the same machine.
white-list: This is a big one. If set to true, only the players who have their usernames in the whitelist file can join the server.
|-
 
|<code>level-seed</code>||–||Sets the seed for the world generation algorithm. If left blank, a random seed will be used. If you want to generate a specific world, you can enter a seed value here.
server-ip: This determines the IP address of the server.
|-
 
|<code>server-ip</code>||–||Sets the IP address that the server listens on for incoming connections. By default, the server listens on all available IP addresses. If you want to restrict the server to a specific IP address, you can enter the IP address here.
pvp: Setting this to false will not allow players to attack each other.
|-
 
|<code>summon-limit</code>||<code>10</code>||Sets the maximum number of mobs that can be summoned at once.
level-seed: The world seed that the server uses to generate a world. Try your favorite world seeds here. (Note that you need to delete the old world for this to work).
|-
 
|<code>sleep-percentage</code>||<code>0</code>||Sets the percentage of players that must be sleeping in order to skip the night cycle. By default, this value is set to <code>0</code>, which means that the night cycle can be skipped by only one player.
spawn-animals: If set to false, no animals will spawn.
|-
 
|<code>white-list</code>||<code>false</code>||If set to <code>true</code>, only players whose usernames are listed in the server's whitelist file will be allowed to connect to the server. If set to <code>false</code>, all players are allowed to connect.
server-port: Don't touch this.
|-
 
|<code>spawn-animals</code>||<code>true</code>||If set to <code>true</code>, animals will spawn in the world. If set to <code>false</code>, no animals will spawn.
allow-nether: If set to false, players cannot enter the nether.
|-
 
|<code>online-mode</code>||<code>true</code>||If set to <code>true</code>, the server will verify that each player has a valid Minecraft account before allowing them to connect. If set to <code>false</code>, players will be allowed to join even if their Minecraft account cannot be verified, which includes players without a premium Minecraft account.
spawn-monsters: if set to false. Monsters will not spawn in the dark and/or at night.
|-
 
|<code>pvp</code>||<code>true</code>||If set to <code>true</code>, players can damage each other.
max-players: Determines how many players can join your server at one time. The players though. The more performance and memory it takes out.
|-
 
|<code>join-message</code>||–||If set, players will receive a message in the chat upon joining the server.
world-type: allows you to set the type of world that generates. (Default. Extended Default, Hell, etc.)
|-
 
|<code>difficulty</code>||<code>2</code>||Sets the difficulty of the server. Use <code>0</code> for peaceful, <code>1</code> for easy, <code>2</code> for normal and <code>3</code> for hard.
online-mode: If set to false. Only you can join the server. Good for making edits while your buddies arent around. (Note that if you're running this on another device and not your pc. You cant join as well).
|-
 
|<code>max-players</code>||<code>20</code>||Sets the maximum number of players that can join the server.
allow-flight: If set to false. Flying/Noclipping is disabled.
|-
|<code>spawn-monsters</code>||<code>true</code>||If set to <code>true</code>, monsters will spawn in the world. If set to <code>false</code>, no monsters will spawn.
|-
|<code>view-distance</code>||<code>10</code>||Sets the maximum player view distance in chunks.
|-
|<code>spawn-protection</code>||<code>0</code>||Defines a radius from the world's spawn protected from non-operators.
|-
|<code>packet-delay</code>||<code>20</code>||Determines the amount of time (in ticks) between packets sent to clients. Lower values mean faster. The default value (<code>20</code>), when converted to seconds, represents one second.
|}

Revision as of 18:14, 17 March 2023

This page is in need of a rewrite.
You can help us by editing it.

This page aims to offer a comprehensive guide on hosting a Better than Adventure! server.

Generating the server files

To generate the server's files, it is necessary to have a server jar of the desired game version. Usually, server jars can be found in the #announcements channel of the official Better than Adventure! Discord server. In this channel, the latest version or snapshot can be found, and a "download server jar" link can be clicked in the list of links. It should be noted that snapshots often do not have a server jar due to their instability and subjectness to change.

After downloading the server jar file, it should be placed in its own folder. The server will create a bunch of files in the same folder or directory as the jar file. Once the file is in its directory, double-click the file to run it. This should open a window, allowing for the creation and management of a Better than Adventure! server.

The server window that appears when a server is opened.

Once the server is done loading, its window should contain a message similar to the following:

[INFO] Done (67616565924ns)! For help, type "help" or "?"

Playing the server

Now that the server is running, it is possible to join it by opening an instance of the respective version of Better than Adventure! and typing "localhost" into the server IP textbox. If all steps are followed correctly, the player should be loaded into the world.

The server screen. Note that localhost is written in the textbox, which should load the player into the world.
The randomly generated world created.

Customizing the server

After the server has been set up, the server can be customized by editing various configuration files.

server.properties

The most important file to adjust is server.properties, which includes multiple adjustable parameters that can be tailored to meet the needs of players. Below is a table of the parameters with their respective default values and explanations:

Parameter Default value Note
mob-griefing false If set to true, allows mobs to modify blocks. If set to false, mobs cannot modify blocks (e.g. creepers cannot destroy tiles on explosions).
allow-nether true If set to true, players can access the Nether dimension by building a Nether portal. If set to false, players cannot access the Nether dimension.
level-name world Sets the name of the world that is generated when the server is started. By default, the name is set to "world". If you want to change the name, you can edit this parameter.
world-type extended Determines the type of world that is generated when the server is started. By default, the world type is set to extended, which generates a world with more varied terrain than the default world type.
allow-flight false If set to true, players are allowed to fly using creative mode or special abilities. If set to false, players cannot fly.
server-port 25565 Sets the port number that the server listens on for incoming connections. The default value is 25565. Most users will not need to change this value, but it may be necessary to change it if there are port conflicts with other applications running on the same machine.
level-seed Sets the seed for the world generation algorithm. If left blank, a random seed will be used. If you want to generate a specific world, you can enter a seed value here.
server-ip Sets the IP address that the server listens on for incoming connections. By default, the server listens on all available IP addresses. If you want to restrict the server to a specific IP address, you can enter the IP address here.
summon-limit 10 Sets the maximum number of mobs that can be summoned at once.
sleep-percentage 0 Sets the percentage of players that must be sleeping in order to skip the night cycle. By default, this value is set to 0, which means that the night cycle can be skipped by only one player.
white-list false If set to true, only players whose usernames are listed in the server's whitelist file will be allowed to connect to the server. If set to false, all players are allowed to connect.
spawn-animals true If set to true, animals will spawn in the world. If set to false, no animals will spawn.
online-mode true If set to true, the server will verify that each player has a valid Minecraft account before allowing them to connect. If set to false, players will be allowed to join even if their Minecraft account cannot be verified, which includes players without a premium Minecraft account.
pvp true If set to true, players can damage each other.
join-message If set, players will receive a message in the chat upon joining the server.
difficulty 2 Sets the difficulty of the server. Use 0 for peaceful, 1 for easy, 2 for normal and 3 for hard.
max-players 20 Sets the maximum number of players that can join the server.
spawn-monsters true If set to true, monsters will spawn in the world. If set to false, no monsters will spawn.
view-distance 10 Sets the maximum player view distance in chunks.
spawn-protection 0 Defines a radius from the world's spawn protected from non-operators.
packet-delay 20 Determines the amount of time (in ticks) between packets sent to clients. Lower values mean faster. The default value (20), when converted to seconds, represents one second.