Setting up a Server: Difference between revisions

3,530 bytes added ,  17 March 2023
m
no edit summary
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.
|}