你有没有这种想法:

想用自己在网上下载的皮肤,但是网易版不支持,用PCL2、HMCL或BakaXL又不能联机(2023年2月27日)

想自己开一个服务器,让自己成为OP大佬。

内网穿透复杂而贵。

.......

那么,接下来,让我们一步步搭建MC服务器吧!

  1. 首先,准备工作不能少,以下为要准备的东西:

Windows11/10电脑
正版账号(可有可无)
Minecraft 1.19.3服务器JAR文件(链接:https://piston-data.mojang.com/v1/objects/c9df48efed58511cdd0213c56b9013a7b5c9ac1f/server.jar)
Java19/18
一个https://frp.starryfrp.com/账号(星空内网穿透账号)
  1. 验证,首先,没有电脑的快去买吧!没正版的我不敢保证可以运行。JAR文件直接点链接。JAVA安装请看下面的教程:

a. 下载安装包,链接:https://download.java.net/java/GA/jdk19.0.2/fdb695a9d9064ad6b064dc6df578380c/7/GPL/openjdk-19.0.2_windows-x64_bin.zip

b. 按照提示一步步来。

  1. 按下Win+R,或者按下Win+X,选择PowerShell或CMD(最好是管理员),输入java -version,如果出现类似于:

java version "19.0.2" 2023-01-17

Java(TM) SE Runtime Environment (build 19.0.2+7-44)

Java HotSpot(TM) 64-Bit Server VM (build 19.0.2+7-44, mixed mode, sharing)

的话就是安装成功,如果出现未知的命令就要按照此方法一步步配置了:

a. 在Windows搜索框里搜索高级系统设置,点击,选择环境变量,点击系统变量中的Path,

点击编辑。

b. 点击新建,输入你的Java安装路径(比如:C:\Program Files\Common Files\Oracle\Java\javapath)

c. 点击新建,输入你的Java安装路径(比如:C:\ProgramData\Oracle\Java\javapath)

  1. 注册账号,看前面。

  1. 前面准备工作做完了,开始真正的搭建吧!

  1. 将下载好的server.jar拷贝至一个空文件夹,将CMD或 PowerShell位置导在那里,输入指令(内存大于6G):

java -server -XX:+UseG1GC  -Xmx4096M -Xms1024M -jar G:/Minecraft_Sever/server.jar nogui
  1. 结束后编辑eula.txt,将false改为true。

  1. 重新运行指令,应出现如下内容:

Starting net.minecraft.server.Main
[11:59:25] [ServerMain/INFO]: Building unoptimized datafixer
[11:59:26] [ServerMain/WARN]: You specified a resource pack without providing a sha1 hash. Pack will be updated on the client only if you change the name of the pack.
[11:59:26] [ServerMain/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD'
[11:59:28] [ServerMain/INFO]: Loaded 7 recipes
[11:59:28] [ServerMain/INFO]: Loaded 1179 advancements
^N^N[11:59:29] [Server thread/INFO]: Starting minecraft server version 1.19.3
[11:59:29] [Server thread/INFO]: Loading properties
[11:59:29] [Server thread/INFO]: Default game type: SURVIVAL
[11:59:29] [Server thread/INFO]: Generating keypair
[11:59:29] [Server thread/INFO]: Starting Minecraft server on *:12486
[11:59:29] [Server thread/INFO]: Using default channel type
[11:59:29] [Server thread/WARN]: **** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!
[11:59:29] [Server thread/WARN]: The server will make no attempt to authenticate usernames. Beware.
[11:59:29] [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.
[11:59:29] [Server thread/WARN]: To change this, set "online-mode" to "true" in the server.properties file.
[11:59:29] [Server thread/INFO]: Preparing level "world"
[11:59:31] [Server thread/INFO]: Preparing start region for dimension minecraft:overworld
[11:59:34] [Worker-Main-5/INFO]: Preparing spawn area: 0%
[11:59:34] [Worker-Main-5/INFO]: Preparing spawn area: 0%
[11:59:34] [Worker-Main-5/INFO]: Preparing spawn area: 0%
[11:59:34] [Worker-Main-5/INFO]: Preparing spawn area: 0%
[11:59:34] [Worker-Main-5/INFO]: Preparing spawn area: 0%
[11:59:34] [Worker-Main-5/INFO]: Preparing spawn area: 0%
[11:59:34] [Worker-Main-5/INFO]: Preparing spawn area: 0%
[11:59:34] [Worker-Main-4/INFO]: Preparing spawn area: 13%
[11:59:35] [Worker-Main-6/INFO]: Preparing spawn area: 95%
[11:59:35] [Server thread/INFO]: Time elapsed: 4053 ms
[11:59:35] [Server thread/INFO]: Done (5.573s)! For help, type "help"
[11:59:35] [Server thread/INFO]: Starting GS4 status listener
[11:59:35] [Server thread/INFO]: Thread Query Listener started
[11:59:35] [Query Listener #1/INFO]: Query running on 0.0.0.0:25565
[12:05:00] [Server thread/INFO]: John_MC_Python[/127.0.0.1:65441] logged in with entity id 181 at (-5.5, 70.0, -7.5)
[12:05:00] [Server thread/INFO]: John_MC_Python joined the game
[12:05:30] [Server thread/INFO]: John_MC_Python lost connection: Disconnected
[12:05:30] [Server thread/INFO]: John_MC_Python left the game
op
[12:06:12] [Server thread/INFO]: Unknown or incomplete command, see below for error
[12:06:12] [Server thread/INFO]: op<--[HERE]
[12:06:45] [Server thread/INFO]: John_MC_Python[/127.0.0.1:65478] logged in with entity id 239 at (-5.5, 70.0, -7.5)
[12:06:45] [Server thread/INFO]: John_MC_Python joined the game
op John_MC_Python
[12:07:19] [Server thread/INFO]: Made John_MC_Python a server operator
[12:07:36] [Server thread/INFO]: [John_MC_Python: Set the time to 1000]
[12:07:43] [Server thread/INFO]: [John_MC_Python: Set the weather to clear]
[12:10:51] [Server thread/INFO]: John_MC_Python lost connection: Disconnected
[12:10:51] [Server thread/INFO]: John_MC_Python left the game
stop
[12:22:17] [Server thread/INFO]: Stopping the server
[12:22:17] [Server thread/INFO]: Stopping server
[12:22:17] [Server thread/INFO]: Saving players
[12:22:17] [Server thread/INFO]: Saving worlds
[12:22:19] [Server thread/INFO]: Saving chunks for level 'ServerLevel[world]'/minecraft:overworld
[12:22:24] [Server thread/INFO]: Saving chunks for level 'ServerLevel[world]'/minecraft:the_nether
[12:22:24] [Server thread/INFO]: Saving chunks for level 'ServerLevel[world]'/minecraft:the_end
[12:22:24] [Server thread/INFO]: ThreadedAnvilChunkStorage (world): All chunks are saved
[12:22:24] [Server thread/INFO]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved
[12:22:24] [Server thread/INFO]: ThreadedAnvilChunkStorage (DIM1): All chunks are saved
[12:22:24] [Server thread/INFO]: ThreadedAnvilChunkStorage: All dimensions are saved
[12:22:24] [Server thread/INFO]: Thread Query Listener stoppedG:\Minecraft_Sever>java -server -XX:+UseG1GC  -Xmx4096M -Xms1024M -jar G:/Minecraft_Sever/server.jar
Starting net.minecraft.server.Main
[12:22:35] [ServerMain/INFO]: Building unoptimized datafixer
[12:22:36] [ServerMain/WARN]: You specified a resource pack without providing a sha1 hash. Pack will be updated on the client only if you change the name of the pack.
[12:22:36] [ServerMain/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD'
[12:22:38] [ServerMain/INFO]: Loaded 7 recipes
[12:22:38] [ServerMain/INFO]: Loaded 1179 advancements
[12:22:40] [Server thread/INFO]: Starting minecraft server version 1.19.3
[12:22:40] [Server thread/INFO]: Loading properties
[12:22:40] [Server thread/INFO]: Default game type: SURVIVAL
[12:22:40] [Server thread/INFO]: Generating keypair
[12:22:40] [Server thread/INFO]: Starting Minecraft server on *:12486
[12:22:40] [Server thread/INFO]: Using default channel type
[12:22:40] [Server thread/WARN]: **** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!
[12:22:40] [Server thread/WARN]: The server will make no attempt to authenticate usernames. Beware.
[12:22:40] [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.
[12:22:40] [Server thread/WARN]: To change this, set "online-mode" to "true" in the server.properties file.
[12:22:40] [Server thread/INFO]: Preparing level "world"
[12:22:42] [Server thread/INFO]: Preparing start region for dimension minecraft:overworld
[12:22:45] [Worker-Main-5/INFO]: Preparing spawn area: 0%
[12:22:45] [Worker-Main-5/INFO]: Preparing spawn area: 0%
[12:22:45] [Worker-Main-4/INFO]: Preparing spawn area: 0%
[12:22:45] [Worker-Main-4/INFO]: Preparing spawn area: 0%
[12:22:45] [Worker-Main-4/INFO]: Preparing spawn area: 0%
[12:22:45] [Worker-Main-4/INFO]: Preparing spawn area: 0%
[12:22:45] [Worker-Main-1/INFO]: Preparing spawn area: 8%
[12:22:46] [Worker-Main-7/INFO]: Preparing spawn area: 89%
[12:22:46] [Server thread/INFO]: Time elapsed: 3571 ms
[12:22:46] [Server thread/INFO]: Done (5.475s)! For help, type "help"
[12:22:46] [Server thread/INFO]: Starting GS4 status listener
[12:22:46] [Server thread/INFO]: Thread Query Listener started
[12:22:46] [Query Listener #1/INFO]: Query running on 0.0.0.0:25565
[12:25:29] [Server thread/INFO]: Stopping the server
[12:25:29] [Server thread/INFO]: Stopping server
[12:25:29] [Server thread/INFO]: Saving players
[12:25:29] [Server thread/INFO]: Saving worlds
[12:25:31] [Server thread/INFO]: Saving chunks for level 'ServerLevel[world]'/minecraft:overworld
[12:25:36] [Server thread/INFO]: Saving chunks for level 'ServerLevel[world]'/minecraft:the_end
[12:25:36] [Server thread/INFO]: Saving chunks for level 'ServerLevel[world]'/minecraft:the_nether
[12:25:36] [Server thread/INFO]: ThreadedAnvilChunkStorage (world): All chunks are saved
[12:25:36] [Server thread/INFO]: ThreadedAnvilChunkStorage (DIM1): All chunks are saved
[12:25:36] [Server thread/INFO]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved
[12:25:36] [Server thread/INFO]: ThreadedAnvilChunkStorage: All dimensions are saved
[12:25:36] [Server thread/INFO]: Thread Query Listener stoppedG:\Minecraft_Sever>java -server -XX:+UseG1GC  -Xmx4096M -Xms1024M -jar G:/Minecraft_Sever/server.jar
Starting net.minecraft.server.Main
[12:26:32] [ServerMain/INFO]: Building unoptimized datafixer
[12:26:34] [ServerMain/WARN]: You specified a resource pack without providing a sha1 hash. Pack will be updated on the client only if you change the name of the pack.
[12:26:34] [ServerMain/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD'
[12:26:35] [ServerMain/INFO]: Loaded 7 recipes
[12:26:36] [ServerMain/INFO]: Loaded 1179 advancements
[12:26:37] [Server thread/INFO]: Starting minecraft server version 1.19.3
[12:26:37] [Server thread/INFO]: Loading properties
[12:26:37] [Server thread/INFO]: Default game type: SURVIVAL
[12:26:37] [Server thread/INFO]: Generating keypair
[12:26:37] [Server thread/INFO]: Starting Minecraft server on *:12486
[12:26:38] [Server thread/INFO]: Using default channel type
[12:26:38] [Server thread/WARN]: **** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!
[12:26:38] [Server thread/WARN]: The server will make no attempt to authenticate usernames. Beware.
[12:26:38] [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.
[12:26:38] [Server thread/WARN]: To change this, set "online-mode" to "true" in the server.properties file.
[12:26:38] [Server thread/INFO]: Preparing level "world"
[12:26:40] [Server thread/INFO]: Preparing start region for dimension minecraft:overworld
[12:26:43] [Worker-Main-5/INFO]: Preparing spawn area: 0%
[12:26:43] [Worker-Main-2/INFO]: Preparing spawn area: 0%
[12:26:43] [Worker-Main-2/INFO]: Preparing spawn area: 0%
[12:26:43] [Worker-Main-6/INFO]: Preparing spawn area: 0%
[12:26:43] [Worker-Main-2/INFO]: Preparing spawn area: 0%
[12:26:43] [Worker-Main-6/INFO]: Preparing spawn area: 0%
[12:26:43] [Worker-Main-5/INFO]: Preparing spawn area: 0%
[12:26:43] [Worker-Main-3/INFO]: Preparing spawn area: 43%
[12:26:44] [Server thread/INFO]: Time elapsed: 3957 ms
[12:26:44] [Server thread/INFO]: Done (5.565s)! For help, type "help"
[12:26:44] [Server thread/INFO]: Starting GS4 status listener
[12:26:44] [Server thread/INFO]: Thread Query Listener started
[12:26:44] [Query Listener #1/INFO]: Query running on 0.0.0.0:25565

(如果结尾部分有些没出现,属于正常现象。)

  1. 这时 Minecraft服务器就启动成功了,输入stop可以停止(不要Ctrl+C!!!),输入op 玩家名可以设置管理员,可以按照以下内容在停止服务器后用记事本或写字板编辑服务器配置文件server.properties:

allow-nether=true #是否开启地狱

level-name=world #默认世界名称(最好不要改)

enable-query=false #没有什么大用处

allow-flight=false #没有什么大用处

announce-player-achievements=true #意义不明

server-port=25566 #服务器端口(127.0.0.1:25565中的冒号后面是这个server-port的数值)

enable-rcon=false #是否开启rcon监听(没有什么用)

force-gamemode=false #force游戏模式

level-seed= #我的世界地图种子(没有特殊需要就不填)

server-ip= #服务器指向IP(默认不要改放空)

max-build-height=256 #服务器最大建筑高度

spawn-npcs=true #是否有主城NPC

white-list=false #是否开启白名单(开启后在白名单内的玩家才能进入服务器,否则进入不了。不要随便开)

spawn-animals=true #主城是否有动物

snooper-enabled=true #意义不明

hardcore=false #我的世界极限模式是否开启(玩过的都知道)

online-mode=false #是否开启正版验证,需用我的世界官方启动器才能进入

resource-pack= #服务器资源包:填下载地址(不需要就不填)

pvp=true #是否开启服务器PVP

difficulty=1 #服务器难度: 0和平 1简单 2中等 3困难

enable-command-block=false #是否开启命令方块

player-idle-timeout=0 #意义不明

gamemode=0 #玩家默认进入游戏的游戏模式 1创造 0生存 2冒险模式3旁观者

max-players=20 #服务器最大玩家数(超过后玩家无法进入)

spawn-monsters=true #主城是否刷新怪物

view-distance=10 #意义不明

generate-structures=true #意义不明

spawn-protection=16 #服务器最大保护区(玩家破坏建筑不了)

motd=A Minecraft Server MOTD指的是在玩家添加服务器后下面会显示这里面的内容(不能为特殊符号)

motd想要输入中文的话需要点击以下链接:在线 Unicode 编码转换 | 菜鸟工具 (runoob.com)将中文转为Unicode。

前面都是服务器,如果你和你的朋友在同一个网玩,那么在这就可以了,直接让好友输入你的IP,查看方式:输入指令:ipconfig即可。

如果是跨网络游玩,有两种方式,第一种,用联通/电信的可以申请家用公网IP,一般在2000~3000元,第二种,用内网穿透服务,前面都注册完帐号了吧,登录,花两元实名认证,开免费隧道,IP填你的IP,端口是刚才配置文件中server-port的值,用TCP,用#59,下载客户端,启动,让朋友输入客户端提示的域名,如cn-js-zz.starryfrp.com:88888(每天签到领流量,防止流量不够用)。

自己搭建一台MC服务器相关推荐

  1. 使用VMware搭建一台Windows服务器,并搭建Web、DNS解析网站

    使用VMware搭建一台Windows服务器,并搭建web.DNS解析网站 使用VMware搭建一台Windows服务器,并搭建web.DNS解析网站 一.系统的安装 二.系统配置 三.服务器配置 w ...

  2. 在安卓手机上搭建一台微型服务器

    相信很多人手上都有一些闲置的手机,那可不可以在这些手机上搭建一个服务器呢?下面我们分享一种搭建简易服务器的思路. 1.ROOT手机 ROOT并非必须,但是ROOT后我们可以更方面的进行保活等操作,各个 ...

  3. 文件集群服务器怎么搭建,一台云服务器怎么搭建集群

    一台云服务器怎么搭建集群 内容精选 换一换 共享云硬盘是一种支持多个云服务器并发读写访问的数据块级存储设备,具备多挂载点.高并发性.高性能.高可靠性等特点.主要应用于需要支持集群.HA(High Av ...

  4. Centos中搭建多台Tomcat服务器

    为了满足业务需求,我们需要在同一台 Centos 服务器中搭建多个 Tomcat 服务器,下面,就让我们一起来看看吧 1.安装 JDK https://blog.csdn.net/qq_4006577 ...

  5. 在云服务器上搭建自己的mc服务器

    本来写这个是想混点积分,但是没有积分,后续也懒得写了,如有不懂的地方请私聊我,看到就会回复 在家闲坐着想和朋友联机玩mc,就搭建了一个小型mc服务器,在这里记录总结一下.如有错误还请指正! 一.购买服 ...

  6. 使用废旧的安卓手机搭建一台web服务器

    利用周末时间学习下服务器搭建 本实验利用的是红米3X手机 我爸退休下来的老爷机了. 本实验并非是在安卓环境下运行web服务器,而是在linux下搭建的.这里借助了aid learning这个工具,在安 ...

  7. 闲置电脑搭建一台linux服务器,在局域网内访问

    首先两台主机要在同一个局域网下. linux系统要开启ssh服务,以Ubuntu为例: ①在终端中输入: sudo apt-get install openssh-server 安装openssh. ...

  8. 初试:搭建MC服务器

    说来也挺魔幻的,做软件工程作业的时候有同学上去问了一句"因为技术有限,总不能去整一个服务器吧",然而院长却说:"你真的可以去租一个来做这个项目."什么项目呢?就 ...

  9. linux mc服务器 mod_如何在linux搭建MC服务器

    摘要: 前言Q:为什么要用linux搭建MC服务器?A:因为linux系统占用率低,跑服务器效果非常好Q:看不懂linux ssh,后期自己无力运维怎么办A:没关系,这个教程是通过安装BT... 前言 ...

最新文章

  1. OpenCV+python:直方图的应用(一)
  2. scrolling=no 无法根据坐标获取元素_减少三坐标测量误差的正确测量方式
  3. android webview js交互,响应webview图片的响应事件
  4. STM32 基础系列教程 14 - IIC
  5. python 对excel文件进行分词并进行词频统计_python 词频分析
  6. 一张图片学Python
  7. C/C++ OpenCV均值滤波
  8. 贪吃蛇的c语言代码怎么弄,刚学C语言,想写一个贪吃蛇的代码
  9. 在更新iOS14.5後,App要追踪我們會先收到彈窗提示
  10. html复选框控制元素禁用,如何勾选复选框时禁用HTML必需属性?
  11. Unity 中英文互译插件
  12. 算法培训(一)---排序算法
  13. mess组网 中继_还在用无线路由器中继?快来看乙辰科技全新更智能的无线Mesh组网...
  14. 面试官:为何Redis使用跳表而非红黑树实现SortedSet?
  15. Gitee代码提交 自用
  16. 现流行的第三方库及名称
  17. PDPS15.0机器人汽车件焊接 喷涂 人机仿真视频教程
  18. CHAPTER 23 Question Answering
  19. 杠杆炒股选择几倍比较适合?
  20. 《Redis设计与实现》笔记|SDS动态字符串|链表字典跳跃表整数集合压缩列表结构|redis中的对象|数据库原理|RDB持久化|AOF持久化|事件与多路利用模型|发布订阅原理|事务原理|慢查询日志

热门文章

  1. “爱运动管理系统”诞生记(1)
  2. 什么是轻量化,轻量化模型is all your need hhh
  3. Leaflet 改变坐标原点
  4. Dragonboard410c服务器系列六之用户交互系统
  5. 【uni-app】uniapp 实现一键登录 超详细记录~
  6. 现在,我们该怎么创业
  7. 秋招已至,来看看数字IC设计岗位的招聘标准
  8. CSDN兴趣标签功能测试验证:感兴趣标签新增、不感兴趣标签新增、兴趣标签还原
  9. 《OC疯狂讲义》笔记(三)
  10. Image Signal Processing(ISP)-第四章-LSC, CC的原理和软件实现