书接上文,下面开始讲服务器配置过程
3、准备必要的文件
在开始配置之前,先下载我写的小工具
1 2 3 4 |
链接:https://pan.baidu.com/s/1NgZigslGX7g4digrmtanog 提取码:b2ym 有两个压缩包,一个带java运行库和服务器文件,一个不带需要自行下载并放到对应目录里 |
下面以不带运行库文件的压缩包为例,如果你下载了带运行库的压缩包可以直接跳到第4步
把压缩包解压到一个位置,目录结构如下:
1 2 3 4 5 6 |
├─ mcserver //服务器文件放这里 ├─ runtime //jre运行库放这里 │ eula.txt │ Minecraft Server Launcher.exe //主程序 │ Properties Editor.exe //配置文件编辑器 │ Rcon Client.exe //快捷tp工具 |
- 把下载的服务器文件放到mcserver目录下,文件名为
minecraft_server.1.x.x.jar
- 从java运行库安装目录下复制所有文件到runtime目录下,默认目录为
C:\Program Files\Java\jre1.8.x_xx
,
4、配置并运行服务器
文件准备完毕后就可以正式开始了,只要一步步跟着做再有几分钟你的服务器就可以上线啦
- 运行
Minecraft Server Launcher.exe
- 点第三个按钮启动
Properties Editor
并简单设置一下
几个要点
- 从顶部的下拉列表选择要启动的服务器文件(版本)
- 服务器名称会显示在多人游戏列表里
服务器端口
是给局域网里的小伙伴用的,需要记下- 开启
远程访问控制台
并设置密码和端口,以供快捷tp工具
使用,需要记下- 取消
启用在线验证
的作用你懂的
-
点击保存按钮并退出
Properties Editor
-
回到
Minecraft Server Launcher
点第一个按钮启动服务器,但是第一次启动会因为缺少文件而抛出几个错误,没关系,再点两次第一个按钮(关闭服务器→启动服务器),服务器就已经可以正常启动了
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
[10:54:42] [Server thread/INFO]: Starting minecraft server version 1.10 [10:54:42] [Server thread/INFO]: Loading properties [10:54:42] [Server thread/INFO]: Default game type: SURVIVAL [10:54:42] [Server thread/INFO]: Generating keypair [10:54:43] [Server thread/INFO]: Starting Minecraft server on *:25565 [10:54:43] [Server thread/INFO]: Using default channel type [10:54:43] [Server thread/WARN]: **** SERVER IS RUNNING IN OFFLINE/INSECURE MODE! [10:54:43] [Server thread/WARN]: The server will make no attempt to authenticate usernames. Beware. [10:54:43] [Server thread/WARN]: While this makes the game possible to play without internet access, it also opens up the ability for hackers to connect with any username they choose. [10:54:43] [Server thread/WARN]: To change this, set "online-mode" to "true" in the server.properties file. [10:54:43] [Server thread/INFO]: Preparing level "world" [10:54:43] [Server thread/INFO]: Preparing start region for level 0 [10:54:44] [Server thread/INFO]: Preparing spawn area: 39% [10:54:45] [Server thread/INFO]: Done (1.804s)! For help, type "help" or "?" [10:54:45] [Server thread/INFO]: Starting remote control listener [10:54:45] [RCON Listener #1/INFO]: RCON running on 0.0.0.0:25575 |
5、开始联机游戏(局域网)
服务器正常启动后就可以开始多人联机游戏了
不管你用什么手段先启动你的Minecraft游戏,但是一定要确保游戏版本和服务器版本一致否则无法联机,点 多人游戏
→ 添加服务器
这里有两种情况
- 如果你在运行服务器的电脑上进行联机游戏的话,在
服务器地址
里填写localhost
即可如果有其他小伙伴一起联机的话,在
服务器地址
里填写服务器电脑的IP地址加服务器端口,如192.168.0.10:25565
即可查询IP地址的方法是,在dos窗口输入
ipconfig
并回车
1234567891011 C:\>ipconfigWindows IP 配置无线局域网适配器 WLAN 2:连接特定的 DNS 后缀 . . . . . . . :本地链接 IPv6 地址. . . . . . . . : xxxx::xxxx:xxxx:xxxx:cdbc%10IPv4 地址 . . . . . . . . . . . . : 192.168.0.10子网掩码 . . . . . . . . . . . . : 255.255.255.0默认网关. . . . . . . . . . . . . : 192.168.0.1
至此已经可以在局域网内进行多人联机游戏了,下面讲一下通过外网进行多人联机游戏的方法
TO BE CONTINUED