快速入门指南

This is a step by step reference on how to create a Minecraft server with Sponge version 7 and above.

备注

你是不是从 Bukkit 或者 Canary 迁移过来的?如果是,请阅读“迁移到 Sponge”一文,其中详细介绍了这些平台和 Sponge 之间的差别及迁移流程。

警告

如果你的服务器是架设在诸如 BungeeCord、Watefall 或 Velocity 之类的服务器代理后面的,你需要在安装 Sponge 后执行一些额外流程,可在这里找到:在 Sponge 上使用服务器代理

系统要求

The version of Java that you require depends on the version of Sponge (and therefore Minecraft) that you wish to run:

SpongeAPI version

Minecraft version

Minimum Java Version

Notes

7.x

1.12.2

Java 8

Requires at least update 20. Does not work with Java 9 or later.

8.x

1.16.5

Java 8

Java 17 is recommended

9.x (unreleased)

1.18

Java 17

Java 8 is not supported

We also recommend a CPU with a large single core speed and at least 2GB of RAM (higher if you plan to run with mods). We highly recommend using the 64bit Java runtime.

参阅“安装 Java”一文以获得更多关于如何安装 Java 8 的帮助。

SpongeForge 还是 SpongeVanilla?

Sponge 提供两个直接基于官方 Minecraft 服务器端的实现:

  • SpongeForge——一个基于 Forge 的 Mod,允许你同时安装基于 Sponge 的插件和基于 Forge 的 Mod;

  • SpongeVanilla——一个独立的服务器端 jar,允许你在只用原版 Minecraft 的基础上使用 Sponge。

选择时请注意以下事项:

  • 如果你想同时使用 Sponge 和基于 Forge 的 Mod,你必须使用 SpongeForge

  • 如果你想在单人游戏中使用 Sponge,你必须使用 SpongeForge

  • 如果你想在原版服上使用 Sponge,你可以在 SpongeForgeSpongeVanilla 中二选一。

尽管所有的选项中都出现了 SpongeForge,但实际上 SpongeVanilla 比 Forge + SpongeForge 的组合更容易升级和安装。

备注

目前也有不使用 Mojang 的任何代码的 SpongeAPI 的实现(例如 Lantern)。本指南只关注 Sponge 项目提供的实现。

SpongeForge

SpongeForge is a mod for Minecraft Forge and therefore requires a Minecraft Forge server. Set up your Minecraft Forge server first. Once you have your server set up, you can get SpongeForge from our downloads page and place it in the “mods” directory alongside any other mods you may wish to install. You can then start your Forge server and Sponge should be loaded.

注意,SpongeForge 需要在兼容的 Forge 版本上运行。SpongeForge 构建时使用的 Forge 版本会在下载页及文件名中注明。升级 SpongeForge 时可能需要升级 Forge。

警告

噢,请注意。有些Mod可能会与SpongeForge产生冲突,导致错误出现在报错上面。在提交错误给Sponge时,请参考:ref:quickstart-when-things-go-wrong,特别是:doc:spongineer/incompatible。你也可以通过其他方法向我们获取帮助

关于创建 Forge 服务器并在上面安装 SpongeForge 的更多信息,可参考:安装 SpongeForge

SpongeVanilla

SpongeVanilla 是一套运行在原版 Minecraft 服务器上,在运行时将 Sponge 相关代码注入 Minecraft 底层的软件。和 SpongeForge 不一样的是,你不需要为了运行 SpongeVanilla 而预先创建 Minecraft 服务器。也因此,SpongeVanilla 安装和升级流程更为简单,适用于那些只需要原版游戏体验的用户。

You can get SpongeVanilla from our downloads page. Once downloaded, ensure that you run SpongeVanilla using the command line, as Sponge disables the server console GUI to increase performance. SpongeVanilla will download the appropriate version of Minecraft and setup the server structure for you.

关于创建 SpongeVanilla 服务器的更多信息可在这里找到:安装 SpongeVanilla

配置 Sponge

Sponge 拥有十分灵活的配置。尽管它本质上只是为服务器提供 SpongeAPI 的,但 Sponge 也提供了可选的性能调优选项和对原版游戏的漏洞修复,以及一些控制 Sponge 的高级系统的精细选项。Sponge 自身的配置文件可在 config/sponge 目录下找到。

关于配置 Sponge 的更多信息可在这里找到:配置 Sponge

安装插件

The directory where plugins are installed depends on the version of Sponge that you are using.

  • For SpongeAPI 7 and earlier, plugins go in the /mods directory.

  • For SpongeAPI 8 and later, plugins go in the /plugins directory.

Once you have added your plugins to the plugins directory, start (or restart) your server. Your plugins should then be available, which you can verify by running the /sponge plugins command.

备注

Songe 没有和 Bukkit /reload 等价的命令,也因此插件不能在服务器还在运行时卸载然后重新加载。插件变更只有在重启服务器后才会生效。

插件安装完成后可能会生成若干配置文件。Sponge 的惯例是将配置文件放置于 config 目录下,但实际情况可能有所不同。必要时请参阅插件各自的文档以寻求帮助。

更多关于插件的信息可在我们关于插件安装的介绍页面找到。

备注

你可以在我们管理的插件仓库 Ore 上找到社区成员制作的 Sponge 插件。

下一步

现在你已经建立了你的服务器,我们建议你熟悉下列内容,以方便日后服务器管理:

当你遇到问题时

不兼容的 Mod 和其他不正常的行为一直都是服主们的心腹大患。在寻求帮助之前,参考下列页面中的建议也许能帮助你快速解决问题: