这个模组有什么功能?
该模组目前仅支持上传和下载 datapacks 文件夹到服务器以及从服务器下载,尽管它最初的设计目标是用于整个世界文件夹。
为什么要使用这个模组?
我制作这个模组是因为我的朋友有一个私人的创造模式服务器,我想进行命令相关的操作。最终,命令方块的数量变得太多,以至于修改起来不再有趣,而且由于某些原因,我的朋友无法给我提供服务器文件的访问权限,以便我将我的命令放入数据包中。
我仍然可以通过数据包来实现这一点,但我只需要每隔几分钟就麻烦我的朋友把数据包上传到服务器上。或者继续使用那些令人头疼的命令方块。
或者我可以创建这个模组。
所以这就是这个模组的用途所在。
你也可以用它来加快向服务器上传数据包的过程,如果你使用的是第三方服务器托管服务的话。
我建议将此模组与添加 /restart 命令的模组以及 Advanced Backups 一起使用。
如何使用这个模组?
此模组需要 fabric api,请确保已安装。
在你的 minecraft 文件夹(默认为 %appdata%\.minecraft)中应该有一个新的 fetched_worlds 文件夹。这里会有更多以你从中获取数据包的服务器 IP 命名的文件夹(datapacks 文件夹是世界文件夹的一部分)。
此模组目前有两个命令,默认情况下都需要 4 级权限。
/worldaccess-push将你的 datapacks 文件夹上传到服务器/worldaccess-pull下载服务器的 datapacks 文件夹
从这些描述中你应该已经知道如何使用这个模组了。
配置
此模组的配置文件位于 config/WorldAccess.properties。它具有以下选项:
filterFileExtensions一个逗号分隔的文件扩展名列表,根据 filterMode 允许或阻止这些扩展名的文件。默认情况下,只列出预期会出现在数据包中的文件。allowExtensionless没有文件扩展名的文件是否应通过文件扩展名过滤步骤?必须是true或false,默认为true,因为有些人可能会在这些文件中留下注释。filterMode可以是whitelist或blacklist。在白名单模式下,除了 filterFileExtensions 中的文件外,不会让任何其他文件通过,这是默认设置。filterHeaders一个逗号分隔的十六进制文件头列表。具有这些头的文件无论过滤模式如何都会被阻止。默认情况下,Windows 和 Linux 可执行文件头以及 java 类和 jar 文件都在其中。readPermissionLevel执行/worldaccess-pull所需的权限级别。此选项对客户端无效。默认为4writePermissionLevel在服务器上执行文件操作所需的权限级别。此选项对客户端无效。默认为4
最坏的情况是什么? 此模组会对你的世界文件进行直接更改。我建议将此模组与 Advanced Backups 一起使用。
我可能会后悔包括这一节,但……算了。
首先提到两件不太可能在私人服务器上发生的事,但仍然比下面提到的事情更有可能发生:你可能会执行 /worldaccess-push,然后被踢出服务器,例如因为你的互联网连接速度慢或者你有一个非常大的数据包。
这会导致服务器拥有不完整的版本的数据包,缺少一些文件。如果你随后重新连接并运行 /worldaccess-pull,你会下载不完整的数据包并最终删除本地存储的副本。非常不幸。
另一件可能发生的事情是两或多个人快速连续上传数据包,从而覆盖其中一个版本,因为这个模组中没有自动版本控制的概念。为了避免这种情况,只需不要让多人在同一时间工作即可。
现在我们进入可怕的黑客环节。
你可能听说过 Litematica 漏洞。那是由于路径遍历漏洞造成的,而这个模组并不存在这个问题。
不要给陌生人 4 级权限,你就安全了。
如果你确实遇到有人拥有写访问权并且想要伤害你,那么他们能做的最坏事情是:
- 上传恶意软件到服务器。此模组防止在世界文件夹之外进行读/写请求,因此不会有自动运行程序。与普遍看法相反,只要你不执行它,设备上有病毒实际上并不可怕。默认配置使得以任何可执行形式上传恶意软件相当困难,因此意外运行的可能性很小。在这方面没什么好担心的。
- 上传大量大文件以占用磁盘空间,这可能会导致如果服务器在主磁盘上时出现一些操作系统错误。
问题 如果你遇到任何尚未列出的 bug,可以在 issue tracker 上找到,或者发现安全漏洞,请 报告它。 如果你想请求我添加某个功能或移植到特定版本,你也可以打开一个问题。 请记住:我是在空闲时间做这件事的,可能不会及时满足你的请求,但值得一试。
What does it do?
This mod currently only supports uploading and downloading the datapacks folder to and from the server, though it was originally intended to work for the entire world folder.
For what reason would anybody use this?
I made this mod, because a friend of mine had a private creative server and I wanted to do command stuff. Eventually there were too many command blocks for it to be fun to change stuff anymore and for reasons this friend could not give me access to the server files for me to put my commands in a datapack.
I could still do it with a datapack, I'd just have to bother my friend every few minutes to upload my datapack to the server. That or keep using the botherful command blocks.
Or I could create this mod.
So that's what this mod was made for.
I guess you could also use it to speed up the process of uploading datapacks to your server, if you use some third party serverhost.
I recommend using this mod alongside some mod adding a /restart command and Advanced Backups.
How to use the mod?
This mod requires fabric api, make sure to have it installed.
In your minecraft folder (%appdata%\.minecraft by default) there should be a new fetched_worlds folder. In here are more folders, named after the IP of the servers from which you have fetched the datapacks (the datapacks folder is part of the world folder).
This mod currently has two commands, both of which require permission level 4 by default.
/worldaccess-pushUploads your datapacks folder to the server/worldaccess-pullDownloads the servers datapacks folder
From those descriptions you should already know how to use this mod.
Config
The config file of this mod is located in config/WorldAccess.properties. It has the following options:
filterFileExtensionsA comma seperated list with file extensions to allow or block depending on filterMode. By default only files that are to be expected in a datapack are listed here.allowExtensionlessShould files without a file extension pass the file extension filtering step? Must betrueorfalse, defaults totrue, as some people may leave notes in these files.filterModeEitherwhitelistorblacklistno files except those in filterFileExtensions will be let through when in whitelist mode, which is the default.filterHeadersA comma seperated list of hexadecimal file headers. Files with these headers will be blocked regardless of the filter mode. By default Windows and Linux executable headers and java class and jar files are on here.readPermissionLevelThe permission level required to perform a/worldaccess-pull. This option has no effect on the client. Defaults to4writePermissionLevelThe permission level required to perform file operations on the server. This option has no effect on the client. Defaults to4
What is the worst that can happen?
This mod makes direct changes to your worldfiles. I recomend you use this mod alongside Advanced Backups.
I might regret including this section, but... oh well.
Starting off with two things that are unlikely to happen in a private server, but still far more likely than the stuff further down: You could do a /worldaccess-push and then get timed out, because for example your internet connection is slow or you have a very large datapack.
This would result in the server having an incomplete version of the datapack with some files missing. If you were to then reconnect and run /worldaccess-pull you would download the incomplete datapack and end up deleting your locally stored copy. Very unfortunate.
The other thing that could happen is two or more people uploading datapacks in rapid succession, overriding one of their versions in the process, as there is no such thing as automatic versioning in this mod. To avoid this just don't have multiple people working at the same time and everything should be fine.
Now we come to spooky scary hackers.
You might have heard of the Litematica vulnerability. That was because of a path traversal voulnerability, which this mod is not have.
Don't give permission level 4 to strangers and you're safe.
If you do end up with someone having write access who wants to harm you then this is the worst they can do:
- Upload malware to the server. This mod pervents read/write requests outside your world folder, so no autoruns. Contrary to common belief, having a virus on your device is not actually dangerous, so long as you don't execute it. The default config makes uploading malware in any form that can be executed quite difficult, so running it accedentally is quite unlikely. Not anything to worry about here.
- Upload lots of big files to use up your disk space, which could cause some janky OS bugs if the server is on your main disk.
Issues
Should you encounter any bugs not already listed on the issue tracker or find a security vulnerability, please do report it.
You may also open an issue, should you want to request for me to add in a feature or port to a specific version.
Please remember: I am doing this in my free time and may not come around to fulfilling your request, but it's worth a try.
下载 Datapack Sync
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Datapack Sync
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Datapack Sync
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Datapack Sync
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Datapack Sync
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Datapack Sync
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Datapack Sync
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Datapack Sync
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Datapack Sync
下载 Datapack Sync
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
暂无更新日志
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
查看物品与配方
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
添加区块认领和玩家组队功能,并与 Xaero's Minimap 和 World Map 集成
模组
添加全屏世界地图,显示你在世界中已探索的区域。与 Xaero's Minimap 搭配使用效果极佳。
评论 0
登录后参与评分
还没有评论,来抢沙发吧