Minecraft Java Edition Opening Tutorial (Linux)

Original link: https://fmcf.cc/technology/865/

Linux server is also very simple, the memory footprint is small, it is recommended to use, the following uses Ubuntu18.04.1 demo

You can play without a genuine account

Bedrock Edition protocol UDP, default port 19132
Java version protocol TCP, default port 25565

Minecraft Chinese website: https://www.mcbbs.net/ , plugins, mods, and integration packages are available
minebbs: https://www.minebbs.com/
Mod Encyclopedia: https://www.mcmod.cn/
mc navigation network: https://www.mcnav.net/
Panel Suit: https://mcsmanager.com/

Launcher (includes versions)
pcl2 launcher: https://afdian.net/p/0164034c016c11ebafcb52540025c377
hcml launcher: https://hmcl.huangyuhui.net/
Official Launcher: https://www.minecraft.net/zh-hans/download/alternative

In the Minecraft server, the most important part is the server core, which usually has the following categories:
Minecraft vanilla core
Minecraft pure plugin core
Minecraft pure mod core
Minecraft plugin mod mix core

Plug-ins are some additional components that can help server owners to complete the management work. They do not need to be installed on the client. Compared with plug-ins, MOD needs to be added on both the server and the client to be used. Adding the client on the server alone will Can not enter the server, add it on the client alone, can enter the server, but MOD will not play a role (auxiliary category is another, such as minimap, top display items, Xray perspective, etc., here only refers to the personal function category)

At present, the mainstream servers of Minecraft Java Edition are : (there are some that I have not learned about and will not be listed)

core name describe address
original server The official server, that is, the pure server, cannot add plug-ins. After installing forge, you can add Mods, and there are few customizable contents. https://mcversions.net/
Bukkit/CraftBukkit
(bucket suit)
The original plugin server does not support adding Mods, but you can add Bukkit plugins. It can use CraftBukkit plugins, but it has poor compatibility with Spigot plugins. It can only add CraftBukkit plugins and some Spigot plugins. https://getbukkit.org/download/craftbukkit
Spigot (faucet) Spigot optimizes Bukkit, supports adding Bukkit plugins, but does not support adding Mods, with good stability https://getbukkit.org/download/spigot
Paper (paper faucet) Paper optimizes Spigot, supports CraftBukkit and Spigot plugins, but does not support adding Mods,
With TPS optimization, the core of the version before 1.9.x has its own anti-cheating function, which is removed after 1.9.x
https://papermc.io/
MCPC+ Mod and Bukkit plug-ins can be installed to optimize tasteless. Only supports JAVA7 running, up to version 1.7.10 https://sourceforge.net/projects/cauldron-unofficial/files/old_releases/version_1/
KCauldron (KC end) On the KC side, you can install Mod and Bukkit plug-ins, which are more optimized than MCPC+, Cauldron, and Thermos, and do not eat much memory, but the highest supported version is only 1.7.10 https://sourceforge.net/projects/kcauldron/
Thermos (water bottle end) It is an optimized version of KCauldron, which is more stable than the original Cauldron. It can add MOD and Bukkit plug-ins. It supports up to version 1.7.10. https://cyberdynecc.github.io/Thermos/install
Contigo (water glass end) It is the son of Thermos, with most optimizations, server lag optimization, multi-threaded computing, lower latency and better world protection (Forge calls items do not go through Bukkit plugins!) https://github.com/djoveryde/Contigo
Uranium (uranium end) It is an optimized version of KC, multi-threaded operation, higher efficiency, supports Bukkit plug-in and ForgeMOD, up to version 1.7.10 https://www.uraniummc.cc/
Catserver (cat side) A generation of gods developed by the Chinese, supports ForgeMOD ​​and Bukkit/Spigot plug-ins, and optimizes multi-threading, version 1.12.2 https://catmc.org/
mohist (ink end) Both mods and plug-ins can be added. It is compatible with some plug-ins of paper. It does not need a large server to run, and it comes with multi-threading. Many plug-ins are not supported, and some mods are not supported. https://mohistmc.com/
Arclight (Conch End) Both mods and plug-ins can be added. The server network environment is not very good, and it is tiring to download the necessary libraries. https://github.com/IzzelAliz/Arclight/releases
magma Based on Forge and CraftBukkit 1.12.2 server, using Forge’s mod and Bukkit plugin, will support 1.14&1.15 in the future https://magmafoundation.org/
Sponge Forge
(sponge end)
Has its own plug-in system, and can use Mod and Sponge plug-ins together in version 1.8 and above https://www.spongepowered.org/
Sponge Vanilla
(sponge vanilla end)
Support Sponge plug-in, not support ForgeMOD, occupy less memory, low configuration requirements https://www.spongepowered.org/
Glowstone A completely open source server that supports Bukkit plugins. Version 1.12.2, Chinese introduction https://www.mcbbs.net/thread-926208-1-1.html https://www.glowstone.net/

java download (mirror site):

Internal users are recommended to use the mirror site to download (it is recommended to use the programming treasure house, which I think is more complete)
Programming treasure house: http://www.codebaoku.com/jdk/jdk-index.html
injdk: https://www.injdk.cn/
Tsinghua University Mirror Site: https://mirrors.tuna.tsinghua.edu.cn/Adoptium
Huawei mirror site: https://repo.huaweicloud.com/java/jdk/

The mc version and the corresponding Java version:

1.7.X – jdk8
1.8.X – jdk8/11
1.12.X – jdk8/11
1.16.X – jdk16/11
1.17.X – above jdk16
1.18.X – jdk17

Ubuntu can install jdk directly from apt repository

The following is a demonstration of opening the server with the catserver side:

The cat terminal is the first terminal I used to open the server, and it is also the terminal I think is quite good. Although the cat terminal has a dark history, it does not affect my use at all. As we all know, the two most prosperous versions of mod are 1.7.10 and 1.12.2. The new version is richer in content, so I chose catserver directly (note: each version and each core has its own meaning of existence, do not slander others server to tout its own choice)

Simple tutorial:

Command to install JDK8, command to download catserver, command to start

Detailed tutorial:

1. Prepare the server:

The server (Linux system Ubuntu, Debian, centos will do) needs to be prepared by yourself (I recommend using the server, because it runs 24 hours a day and is stable) Use the official recommended Ubuntu to open the server, I use the Ubuntu18.04.1 version here

2. Release port:

Select the protocol according to the protocol of the server (for example, the Java version is the tcp protocol). The default port of the Java version is 25565. Some Ubuntu will open the firewall, you can directly turn it off or choose the port to release (the operation will be described below)

The default login account is Ubuntu

# View the current firewall status, inactive is the closed state and active is the open state. [ centos:firewall-cmd --state ]
sudo ufw status

# Turn off the firewall (do not need to execute if it is not turned on), [ centos:systemctl stop firewalld ]
sudo ufw disable

# View which jdk versions are available in the apt library, [ centos:yum search java|grep jdk ]
apt-cache search java|grep jdk

# To install the Java environment, you need to enter y again to confirm, [ centos:yum install java-1.8.0-openjdk ]
sudo apt-get install openjdk-8-jdk

# Check if jdk is installed successfully
java -version

# Create an empty directory (cat is the directory name, you can do anything)
mkdir /home/ubuntu/cat

# enter the directory
cd /home/ubuntu/cat

# Download the opening package, open the catserver official website, get the download link, [centos: yum -y install wget]
wget https://luohuayu.coding.net/p/CatServerRes/d/CatServerRes/git/raw/master/serverjar/CatServer-a8b73e9-universal.jar

# Run it once and download the necessary files
java -jar CatServer-a8b73e9-universal.jar

# The catserver side ignores this step, if the official service package is run for the first time, an eula.txt will be generated
Enter vim eual.txt then press the i key to enter the edit mode, change the false of eula=false to true
Then press the esc key and enter :wq Enter (don’t miss the colon)

# Enter stop and press Enter to stop running

# Turn off genuine verification, change true to false in online-mode=true in the server.properties file
I have learned a bit of Linux basics, so I prefer to modify it directly with commands (fast speed and high efficiency). Of course, I can choose to install the pagoda panel , visual file management, suitable for Xiaobai

# First introduce the modification directly with the command, you can press the tab key to complete
vim /home/ubuntu/cat/server.properties

# Press the i key or the ins key to enter the edit mode, move the cursor to online-mode=true and change true to false
Then press the esc key and enter :wq Enter (don’t miss the colon)

# Next, create a screen (cat is the name of the window, you can feel free) [ centos:yum install screen ]
screen -S cat

# Start the server and display the following information to prove that the server is successfully opened
java -jar CatServer-a8b73e9-universal.jar

Then you can execute the server command, such as op {玩家id} to give a player administrator permission (requires the player to be online)

# Next, connect to the world to test, enter the public network IP, the port is the default 25565 (you can fill in the port, unless you change it to another port)

# Press Ctrl+A+D to suspend the window, then check if the screen is normal
screen -ls

ok no problem. At this time, the ssh connection software can be turned off.

Configuration:

Server.properties configuration file, official documentation: https://minecraft.fandom.com/wiki/Server.properties

“server.properties configuration file”
generator-settings= #Used to customize the generation of superflat worlds
op-permission-level=4 #Set OP’s permission level #1 – OP can ignore spawn point protection #2 – OP can use /clear, /gamemode, /tp etc commands, editable command block #3 – OP can Use /ban, /deop, /kick and /op Commands #4 – OP can use /stop command
allow-nether=true #Whether to open the hell world (deleting after closing will not generate a hell world)
level-name=world #Main world name
enable-query=false #Whether to enable the GameSpy4 protocol server listener to obtain server information, it is recommended not to modify
allow-flight=false #Allows the player to fly in survival mode with a mod that adds flight functionality installed.
prevent-proxy-connections=false #If the ISP/AS sent by the open server is different from that of Mojang’s authentication server, it will be kicked out
server-port=25565 #The port number of the server
max-world-size=29999984 #Set the maximum radius value of the world border, the unit is block. The world bounds can be set larger by successfully executing the command, # but not exceeding the maximum block limit set here. If you set max-world-size more than the default size, it will have no effect.
level-type=DEFAULT #Determine the type of map generated #DEFAULT – standard world #FLAT – super flat world #LARGEBIOMES – default world, but all ecosystems are larger (only available in snapshot 12w19a, or after official version 1.3)# AMPLIFIED – Default world, but with increased world generation height (only available in snapshot 13w36a, or after release 1.7.2) #CUSTOMIZED – Since snapshot 14w21b, the server also supports custom terrain. The way to use it is to paste the code in generator-settings
enable-rcon=false #Whether to allow remote access to the server console.
force-gamemode=false #Force a player to the default game mode when they join the server
level-seed= #World seed
server-ip= #Bind the server to a specific IP. It is recommended to leave it blank, leave it blank or fill in the domain name you want the server to bind to.
network-compression-threshold=256 #Default will allow n-1 byte packets to be sent normally, if the packet is n bytes or larger, it will be compressed. # So, a lower value will cause more packets to be compressed, but if the bytes of the compressed packets are too small, the gain will outweigh the gain. #-1 – permanently disable packet compression #0 – compress all packets # (64-1500 recommended)
max-build-height=256 #The maximum height that the player can build in the game
spawn-npcs=true #Determine whether to spawn villagers
white-list=false #Server whitelist, OP does not need to join the whitelist
spawn-animals=true #Whether animals can be spawned
snooper-enabled=true #Once enabled, will allow the server to periodically send statistics to https://ift.tt/kxaqb7X.
hardcore=false #Extreme mode (when enabled, the player will be banned from the server after death)
resource-pack-sha1= #SHA-1 value of resource pack, must be lowercase hexadecimal
online-mode=false #Whether to enable genuine verification
resource-pack= #You can enter a URI pointing to a resource pack. Players can choose whether to use the resource pack or not
pvp=true #Whether it is possible to fight
difficulty=1 #Set the difficulty of the game (peaceful(0)=peaceful, easy(1)=easy, normal(2)=normal, hard(3)=difficult)
enable-command-block=false #Whether to enable command block
player-idle-timeout=0 #When entering AFK mode, T out of the server within the specified time, set to 0 to not T out of the server
gamemode=0 #Set the player’s game mode (survival(0)=survival, creative(1)=creation, adventure(2)=adventure, spectator(3)=observer)
max-players=20 #Maximum number of players
max-tick-time=60000 #Set the maximum number of milliseconds spent per tick
spawn-monsters=true #whether to spawn monsters
view-distance=10 #Set the amount of blocks sent by the server to the client (range 3-15) #Reducing this value can effectively alleviate the lag
generate-structures=true #Define whether to generate structures (such as villages) when generating the world
motd=A Minecraft Server #Server information displayed in the player client’s multiplayer server list, displayed below the name. Chinese need to be transcoded
“Catserver Folder Structure”
 Catserver 的文件夹结构├─config //模组的一些设置├─libraries //一些支持库├─logs //存放服务端日志的文件夹├─mods //存放模组的文件夹├─plugins //存放插件的文件夹└─bStats //存放插件配置的一些文件夹└─world //世界文件夹├─data //世界数据文件夹│ ├─advancements │ └─functions ├─DIM-1 //世界里的世界#滑稽│ ├─data │ │ └─functions │ ├─playerdata │ └─region ├─DIM1 │ ├─data │ │ └─functions │ ├─playerdata │ └─region ├─playerdata //玩家数据文件夹└─region ├─banned-ips.json //存放了被ban IP 玩家的UUID 及游戏名称等相关信息。 ├─banned-players.json //存放了被ban ID 玩家的UUID 及游戏名称等相关信息├─bukkit.yml //由Bukkit 派生得到的服务端都有的文件。保存着Bukkit 所提供的最基本的设置选项。 ├─catserver.yml //这是Paper 才有的配置文件,您一般不会在Bukkit 或Spigot 中看到它。 ├─CatServer-a8b73e9-universal.jar //服务端核心├─commands.yml //它提供了一种快速而简单的方法来强制服务器使用Mojang提供的命令(而不是Bukkit中内置的命令)而不产生冲突。 ├─eula.txt //在首次开服的时候,我们需要同意EULA 协议。 ├─help.yml //一些插件的帮助信息会出现在这里面,一般不需要进行什么修改。 ├─ops.json //op们的游戏昵称UUID 等信息会在这里出现。 ├─permissions.yml //是默认的权限定义YAML文件,在启动时自动生成。它的主要功能是将权限节点组合到一个文件中,以便权限插件(以及使用权限的插件)可以在整个系统中使用它。 ├─server.properties //服务端的一些基本设置就在里面,如设置端口,设置游戏难度,设置游戏模式(生存、创造等)等。 ├─spigot.yml //这是Spigot 才有的配置文件,您一般不会在Bukkit 中看到它。因为Paper 是由Spigot 派生而来的服务端,所以在Paper 的服务端中,它也会出现。 ├─usercache.json //储存着用户部分信息的缓存文件。 ├─version_history //一些Minecraft 和服务端核心的版本信息。 ├─whitelist.json //白名单列表。(如果您在server.properties中开启了白名单,您就可以在该文件中添加和管理谁被允许或不被允许进入服务器)

More settings about screen:

If you want to resume the background execution of minecraft commands on the server, just enter
screen -r cat

If you want to close the server, you can execute the following command to kill the screen named mc outside the screen
screen -S cat -X quit

More settings about Ubuntu firewall:

# Open the firewall, you need to enter y to confirm
sudo ufw enable

# Firewall allows ports
sudo ufw allow/deny 19132 //Allow/deny access to port 19132. Port 19132 can be followed by /tcp or /udp, indicating tcp or udp packets.

# After the release is completed, you need to restart the firewall to take effect
sudo ufw reload

Install pagoda:

Official website: https://www.bt.cn/

Ubuntu installation command:
wget -O install.sh http://download.bt.cn/install/install-ubuntu_6.0.sh && sudo bash install.sh
Remember to allow port 8888 in the control panel, even if the Ubuntu firewall is open

This article is reproduced from: https://fmcf.cc/technology/865/
This site is for inclusion only, and the copyright belongs to the original author.

Leave a Comment