bungeecord跨服

前置:

资源下载:点击下载

linux创建start.sh

1
2
3
#!/bin/sh
cd "$( dirname -- "$0" )"
java -Xms512M -Xmx512M -jar BungeeCord.jar

windows创建start.bat

1
2
3
4
@echo off

java -Xms512M -Xmx512M -jar BungeeCord.jar
pause

服务器创建

使用自己已经有的服务器,要有java8的环境

拷贝文件到服务器内

image-20221106181438714

BC文件夹里面是start.shBungeeCord.jar文件

mc2是我的mc服务器

1
2
3
cd BC
chmod u+x start.sh #使用这个指令之后才有权限否则会出现Permission denied
./start.sh #启动

成功之后会出现下面

1
2
3
4
5
6
7
8
9
10
11
12
13
14
18:08:25 [INFO] Loaded plugin reconnect_yaml version git:reconnect_yaml:1.19-R0.1-SNAPSHOT:2d369e8:1664 by SpigotMC
18:08:25 [INFO] Loaded plugin cmd_find version git:cmd_find:1.19-R0.1-SNAPSHOT:2d369e8:1664 by SpigotMC
18:08:25 [INFO] Loaded plugin cmd_server version git:cmd_server:1.19-R0.1-SNAPSHOT:2d369e8:1664 by SpigotMC
18:08:25 [INFO] Loaded plugin cmd_alert version git:cmd_alert:1.19-R0.1-SNAPSHOT:2d369e8:1664 by SpigotMC
18:08:25 [INFO] Loaded plugin cmd_send version git:cmd_send:1.19-R0.1-SNAPSHOT:2d369e8:1664 by SpigotMC
18:08:25 [INFO] Loaded plugin cmd_list version git:cmd_list:1.19-R0.1-SNAPSHOT:2d369e8:1664 by SpigotMC
18:08:25 [WARNING] Forced host server pvp is not defined
18:08:25 [INFO] Enabled plugin reconnect_yaml version git:reconnect_yaml:1.19-R0.1-SNAPSHOT:2d369e8:1664 by SpigotMC
18:08:25 [INFO] Enabled plugin cmd_find version git:cmd_find:1.19-R0.1-SNAPSHOT:2d369e8:1664 by SpigotMC
18:08:25 [INFO] Enabled plugin cmd_server version git:cmd_server:1.19-R0.1-SNAPSHOT:2d369e8:1664 by SpigotMC
18:08:25 [INFO] Enabled plugin cmd_alert version git:cmd_alert:1.19-R0.1-SNAPSHOT:2d369e8:1664 by SpigotMC
18:08:25 [INFO] Enabled plugin cmd_send version git:cmd_send:1.19-R0.1-SNAPSHOT:2d369e8:1664 by SpigotMC
18:08:25 [INFO] Enabled plugin cmd_list version git:cmd_list:1.19-R0.1-SNAPSHOT:2d369e8:1664 by SpigotMC
18:08:25 [INFO] Listening on /0.0.0.0:25577

退出是输入end

config.yml的配置

这里随便使用编译器了,我使用vim和vscode都差不多,不过服务器暂时没配vscode,所以用vim.

参考的wiki链接

1
vim config.yml #进入config.yml

进入后输入/ip_forword,查找ip_forword,i键进入insert模式改为true

image-20221106182415018

1
2
3
4
5
#列举一下哪些要改
force_default_server: true
ip_forword: true
max_players: 20
query_port: 25577 #这个看情况,不过要记住,BC端进入的端口就是这个端口
1
2
3
4
force_default_server #说白了就是强制登录在一个特定服务器里面
Default: false
Type: Boolean
Description: If true, the player will always connect to the default servers specified in the priorities list when they join the server. If false, the player will join the server they were last connected to. Note: forced_hosts does NOT override this. To make the forced_hosts setting work, set this to false. Should be kept on for cracked server!
1
2
3
4
5
6
ip_forward
Default: true
Type: Boolean
Description: Whether to enable IP (which forwards the players true IP to Bukkit, rather than the proxy IP) and UUID forwarding (which forwards the players true online-mode UUID to Bukkit, rather than an offline-mode username hash!)
If you're running an online-mode: true server, It is highly recommended you use this option!
If using this option, please follow this guide to ensure that you have enabled it correctly.

有什么其他想改的可以自己改

下面是servers的配置

1
2
3
4
skyCraft:
address: localhost:25565
restricted: false
motd: '&1Just another BungeeCord - Forced Host'

Note: restricted prevents players from joining the server unless they have the bungeecord.server.[servername] permission
Type:
Map
Description: Within this section, you will list all the servers that will be connected to via the BungeeCord instance. It is recommended to use lowercase for the names of the servers.

按照自己的服务器要求来

1
2
3
#修改之后设置进服之后是哪个服,我设置的是skyCraft,名字要servers设置的一样
priorities:
- skyCraft

然后发现FabricProxy只支持1.18以下的,所以失败了,润!!!!!