Files
netease-bedrock-wiki/mcguide/27-手机网络游戏/课程12:使用Allay开服/1-启用网易支持.md
daoge fb9586cf5d feat: 添加Allay相关教程 (#48)
* feat: 添加Allay相关教程

* feat: 添加 3-NetAllay常用接口文档.md

* docs: 更新NetAllay支持说明,添加常用接口文档链接
2026-03-25 15:13:35 +08:00

52 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
front:
hard: 入门
time: 20分钟
---
# 启用网易支持
本文将指导您调整服务器设置以允许网易客户端进服如果您并不了解如何部署一个Allay服务器请移步至[Allay部署教程](0-Allay部署教程.md)。
## 调整`server-settings.yml`
Allay默认不允许网易客户端进服需要修改服务器根目录下`server-settings.yml`中的如下配置项:
```yaml
network-settings:
# Enable support for NetEase (China) Minecraft clients
netease-client-support: true
# If set to true, only NetEase clients can join the server
# This option only takes effect when netease-client-support is enabled
only-allow-netease-client: false
```
您还可以将`only-allow-netease-client`设置为`true`,以阻止国际版客户端进服。
## 安装NetAllay可选
Allay的API模块默认不提供网易版独有接口例如PyRpc商城接口等。如需使用您需要在服务器上安装[NetAllay](https://github.com/AllayMC/NetAllay)。
您需要从Release页面下载NetAllay的jar包并将其放入服务器的`plugins`文件夹内。
如果您的插件需要调用NetAllay的接口需要在项目中引入NetAllay作为依赖
```kotlin
repositories {
mavenCentral()
}
dependencies {
compileOnly("org.allaymc:net-allay:<version>")
}
allay {
plugin {
dependency("NetAllay")
}
}
```
有关NetAllay的更多内容
- 常用接口文档请见[NetAllay常用接口文档](3-NetAllay常用接口文档.md)
- 源码与项目仓库请见https://github.com/AllayMC/NetAllay