| 文件夾 | 用途 |
|---|---|
| behavior_packs | 這是可以安裝新行為包的地方 目前沒有實裝,可以安裝在地圖里 |
| resource_packs | 這是可以安裝新資源包的地方 目前沒有也沒有實裝,也可以安裝在地圖里 |
| worlds | 如果該文件夾尚不存在,則將在啟動時創(chuàng)建該文件夾 創(chuàng)建的每個世界都將有一個根據(jù)其命名的文件夾 |
白名單
- 如果在
server.properties將white-list設置為true - 服務器將只允許
whitelist.json列表中的玩家進入服務器 - 允許玩家進入服務器必須知道玩家的
游戲昵稱(即登錄 Xbox 后顯示的名字) - 添加一名玩家進入白名單只需要執(zhí)行命令
whitelist add <游戲昵稱> - 從白名單中刪除一名玩家只需要執(zhí)行命令
whitelist remove <游戲昵稱> - 每次修改白名單后都必須執(zhí)行命令
whitelist reload才會刷新白名單 -
whitelist.json中參數(shù)如下
| 鍵 | 數(shù)據(jù)類型 | 值 |
|---|---|---|
| name | 字符串 | 玩家的游戲昵稱 |
| xuid | 字符串 | 可選參數(shù),一般填 name 的值這個就不用填了,該玩家登陸后會自動補充 |
| ignoresPlayerLimit | 布爾值 | true:玩家在超過服務器人數(shù)上限時可以加入服務器 false:玩家不能在超過服務器人數(shù)上限時加入服務器 |
-
whitelist.json文件示例:
[
{
"ignoresPlayerLimit": false,
"name": "MyPlayer"
},
{
"ignoresPlayerLimit": false,
"name": "AnotherPlayer",
"xuid": "274817248"
}
]
權限組
- 可以通過
permissions.json給特定玩家分配特定的權限 - 分配權限的玩家必須具有是登錄Xbox賬號進入服務器的玩家(因為需要他們的 xuid)
- 可以使用
permissions list命令羅列出所有擁有特殊權限的玩家 -
permissions.json文件示例:
[
{
"permission": "operator",
"xuid": "451298348"
},
{
"permission": "member",
"xuid": "52819329"
},
{
"permission": "visitor",
"xuid": "234114123"
}
]
Commands
You can issue commands to the server by typing in the console. The following commands are available. < > means a parameter is required, [ ] means it's optional and | denotes different allowed values. Strings can be enclosed in double quotes, ", if they contain spaces.
Command syntax Description
kick <player name or xuid> <reason> Immediately kicks a player. The reason will be shown on the kicked players screen.
stop Shuts down the server gracefully.
save <hold | resume | query> Used to make atomic backups while the server is running. See the backup section for more information.
whitelist <on | off | list | reload>
on and off turns the whitelist on and off. Note that this does not change the value in the server.properties file!
list prints the current whitelist used by the server
reload makes the server reload the whitelist from the file.
See the Whitelist section for more information.
whitelist <add | remove> <name> Adds or removes a player from the whitelist file. The name parameter should be the Xbox Gamertag of the player you want to add or remove. You don't need to specify a XUID here, it will be resolved the first time the player connects.
See the Whitelist section for more information.
permissions <list | reload>
list prints the current used operator list.
reload makes the server reload the operator list from the ops file.
See the Permissions section for more information.
op <player>
Promote a player to operator. This will also persist in permissions.json if the player is authenticated to XBL. If permissions.json is missing it will be created. If the player is not connected to XBL, the player is promoted for the current server session and it will not be persisted on disk. Defualt server permission level will be assigned to the player after a server restart.
deop <player>
Demote a player to member. This will also persist in permissions.json if the player is authenticated to XBL. If permissions.json is missing it will be created.
changesetting <setting> <value> Changes a server setting without having to restart the server. Currently only two settings are supported to be changed, allow-cheats (true or false) and difficulty (0, peaceful, 1, easy, 2, normal, 3 or hard). They do not modify the value that's specified in server.properties.
Backups
The server supports taking backups of the world files while the server is running. It's not particularly friendly for taking manual backups, but works better when automated. The backup (from the servers perspective) consists of three commands.
Command Description
save hold This will ask the server to prepare for a backup. It’s asynchronous and will return immediately.
save query After calling save hold you should call this command repeatedly to see if the preparation has finished. When it returns a success it will return a file list (with lengths for each file) of the files you need to copy. The server will not pause while this is happening, so some files can be modified while the backup is taking place. As long as you only copy the files in the given file list and truncate the copied files to the specified lengths, then the backup should be valid.
save resume When you’re finished with copying the files you should call this to tell the server that it’s okay to remove old files again.