开发人员文档

存储着帮助您对SS周边开发的相关文档

基础数据API

API地址

https://api.mcsunnyside.com/game/mojang/minecraft/profile/sunnyside

使用说明

基础数据API提供了一个您可以获取玩家playerdata, advancements和stats的地方。

本API数据会每隔8小时更新一次。如果遇到服务器重启,将会立即更新。

本API数据会由CDN缓存,您可能遇到数据不一致的问题。

API介绍

Index API

请求文件:/root.info

描述:获取一个包含玩家总计数、最后更新时间和UUID<->Username的映射表。

返回:

{
	"total": 1,
	"lastupdate": 1584970058378,
	"mapping": {
		"uuid": "username",
		"0000-0000-0000-000000-0000": "foobar"
	}
}
PlayerData API

请求文件: /playerdata/<uuid>.dat

描述:获取指定UUID的玩家的玩家数据 NBT 文件。

返回:

<无法预览 Minecraft NBT 格式文件>
Advancements API

请求文件: /advancements/<uuid>.json

描述:获取指定UUID的玩家的进度数据 JSON 文件。

返回:

{
	"minecraft:recipes/decorations/smoker": {
		"criteria": {
			"has_furnace": "2019-09-15 21:21:09 +0800"
		},
		"done": true
	},
	"minecraft:recipes/decorations/diorite_wall": {
		"criteria": {
			"has_diorite": "2019-09-15 21:20:51 +0800"
		},
		"done": true
	},
	"minecraft:adventure/adventuring_time": {
		"criteria": {
			"minecraft:forest": "2019-09-15 20:48:28 +0800",
			"minecraft:desert_hills": "2019-09-15 21:02:44 +0800",
			"minecraft:desert": "2019-09-15 20:52:30 +0800",
			"minecraft:jungle": "2019-09-15 21:12:07 +0800",
			"minecraft:birch_forest": "2019-09-15 21:11:46 +0800",
			"minecraft:badlands": "2019-09-15 21:13:07 +0800",
			"minecraft:beach": "2019-09-15 21:00:18 +0800",
			"minecraft:river": "2019-09-15 20:51:10 +0800",
			"minecraft:savanna": "2019-09-15 20:51:29 +0800",
			"minecraft:plains": "2019-09-15 20:40:40 +0800"
		},
		"done": false
	},
	"minecraft:recipes/building_blocks/polished_andesite_slab_from_andesite_stonecutting": {
		"criteria": {
			"has_andesite": "2019-09-15 21:22:21 +0800"
		},
		"done": true
	},
	"minecraft:recipes/building_blocks/cyan_concrete_powder": {
		"criteria": {
			"has_sand": "2019-09-15 20:52:39 +0800"
		},
		"done": true
	},
	"DataVersion": 1976
}
Stats API

请求文件: /stats/<uuid>.json

描述:获取指定UUID的玩家的统计数据 JSON 文件。

返回:

{
	"stats": {
		"minecraft:crafted": {
			"minecraft:cooked_beef": 6
		},
		"minecraft:used": {
			"minecraft:dark_oak_log": 12
		},
		"minecraft:custom": {
			"minecraft:time_since_rest": 24892
		},
		"minecraft:broken": {
			"minecraft:stone_pickaxe": 1
		},
		"minecraft:mined": {
			"minecraft:furnace": 2,
			"minecraft:iron_ore": 28
		},
		"minecraft:killed": {
			"minecraft:skeleton": 1
		},
		"minecraft:picked_up": {
			"minecraft:stick": 5
		}
	},
	"DataVersion": 1976
}

封禁列表API

本API使用UniBan v1格式

获取列表

请求:https://api.mcsunnyside.com/game/mojang/minecraft/banlist/sunnyside/get

响应:200 Found

["79ba47e4-bb13-4539-9818-fd0efd18d0fb","6a78bc60-135b-4dd6-95be-2efd8ba2ee76","b75733d2-83d3-46c8-b034-103ef39fc28f","fabe1e91-4059-45fc-8b3e-17c0069ea9ed","09c36d57-f983-4203-9793-30641365e88e","4d3d9c0c-686f-4d6c-8282-0659bd8ebf6e","1389fc18-fe4c-4d23-883d-56bffea295d5","f0ef73ad-d6d1-4f08-b837-e7d92685757c","2d65fb24-b7c9-4695-8b4e-6bb852701a96","c19f9028-44ba-4d0c-abbf-53ff2d138ec3","2cde2f40-43c2-4719-a0e5-514b96482ab1","f53e730f-486e-47db-bd74-469f8f080974","3eb6a3f9-81ae-41a1-b98b-49253a60031a","c67956c7-30b6-4e3d-a84b-983285a6e5f3","08df795d-8138-46c7-8cea-08deeb05db55","356c3254-c3db-48db-a68c-0e221d15f518","f22ef2a1-030e-42d8-abc1-e7ea1f850fd5","2687a56b-ac9f-4efd-9987-591bf440f870","6d9784b5-ee6a-440d-98f9-ada2a5cbd170","c931398c-ebac-43bf-8ae6-d7e8a0fd3ff5","f3b404d5-a59f-4b3b-9a67-0a127e5e5645","d0f5bda2-2bba-4bbe-94d4-07f2cbec11b4","e47d01a7-499e-4ffb-83ba-1e595eb630c7","f7cc0a6f-2d6d-35b4-ad43-deb470bdc280","c529728d-b5d4-4e80-b8c8-25d4fcf825a6","eb3ed839-62a7-49ab-b668-b0f7dfc8ca6f","6716558c-8ce7-4348-ba88-2d778ca451dd","d42edde3-ffe4-4651-9f8d-96fa20b20a0e","63d8739c-c51b-43cf-82bf-253053ff69d3","8849586b-db38-482c-b36d-7b8566d3a235","e582ccd2-5e51-49ba-9474-587c461a7f93","ea5446fa-9498-44d7-bdf6-43715f01b8dd","8b53601c-1ca6-4f9e-b06b-4485a9701e54","56544a0d-4fd6-4627-b0b4-4011cf8867c4","7e774be4-cd4e-49c4-b780-de2d321eca63","e72e826b-6c78-47fb-921b-c01601818687","06801488-af94-49aa-87e0-bd638f2db555","866f2e2c-dd3e-48f3-a134-8f2af725247b","9d7205d3-8abf-4995-8b4c-da135f70996a","4c11a3c5-730b-49d4-b30d-841e448f7941","cfa437b6-b8ca-4d61-934c-503dc1e294fd","eef1734d-17a3-4761-8141-b89db0d3e128","6ccb44d5-62be-4f27-a2ee-d0483a241b5c","4c81ba61-1122-4db0-b5f1-b84257a84335","1410212a-92cf-4809-af4e-541f60f10181","5c40d18c-02b8-4fe4-91b1-069401275e71","56f70bd0-4a8f-480a-8354-689efd490545","93fbd412-4740-4050-9d23-65266a39fea0","842af551-1c1b-4edf-8952-b9cdbc2b52e1","3cd12561-7445-491c-b6bb-b41052a21e8e","615b0c95-8494-494f-bfb0-01475d318623","c535b8be-9914-490b-af0b-9a80a311b7fe","02ebe55c-d1e4-4e0b-bee4-b918c1b13262","d8bb6506-da4f-42d7-b642-db86cc0b701d","294d8350-0e69-46f6-94c9-ca0515cd12ff","26df2e78-e47d-463e-bd6e-32e518f4ede6","aeb189ba-cdbf-4989-ae27-272adb1a1cd7","e7f0e9a7-ddfc-413c-a64b-333594c83edf","def88b42-3071-4b4f-aded-045203b54e70"]