• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Shadowwolf97/Minecraft-UUID-Utils: Minecraft UUID Utils

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

Shadowwolf97/Minecraft-UUID-Utils

开源软件地址(OpenSource Url):

https://github.com/Shadowwolf97/Minecraft-UUID-Utils

开源编程语言(OpenSource Language):

PHP 100.0%

开源软件介绍(OpenSource Introduction):

Minecraft UUID Utils

Minecraft UUID Utils is a set of ready to use PHP classes to fetch Minecraft usernames or uuids from either a uuid or username.

These classes allow you to find a user's UUID from their Username or Username from UUID.

Documentation

MinecraftProfile->getUsername()

Returns the username of the Minecraft Profile

MinecraftProfile->getUUID()

Returns the UUID of the Minecraft Profile

MinecraftProfile->getProperties()

Returns base64 encoded string.
This string contains information such as Skin, ProfileName, TimeStamp.
String must be decoded first to retrieve information.

MinecraftProfile->getProfileAsArray()

Properties Descriptions
"username" Returns the users username
"uuid" Returns the users UUID
"properties" Returns base64 encoded info for players. Information must be decoded to get extra data such as Skin, ProfileName, TimeStamp

Usage

Make sure to include the Minecraft UUID library.

include("MinecraftUUID.php");

Username to UUID

Example:

$profile = ProfileUtils::getProfile("Shadowwolf97");

if ($profile != null) {
  $result = $profile->getProfileAsArray();
  echo 'username: '.$result['username'].'<br>';
  echo 'uuid: '.$result['uuid'].'<br/>';
}

UUID to Username

Example:

$profile = ProfileUtils::getProfile("c465b1543c294dbfa7e3e0869504b8d8");

if ($profile != null) {
  $result = $profile->getProfileAsArray();
  echo 'username: '.$result['username'].'<br>';
  echo 'uuid: '.$result['uuid'].'<br/>';
}

FindProfile.php

Usage, Username to UUID, and UUID to Username (above) goes live with this file.

It accepts GET Request with either username or uuid.

Append "?username=YOUR_USER_NAME" to retrieve associated UUID OR Append "?uuid=YOUR_UUID" to retrieve associated Username

This will print out Username and UUID on the screen.

Background Assets:

There are also functions that may be called that might be useful.

ProfileUtils::getUUIDFromUsername

Takes in a string username.

This function will convert the username and will return an array. This array is in the format of (Key => Value) "username" => Minecraft username (properly capitalized) "uuid" => Minecraft UUID.

ProfileUtils::getUUIDsFromUsernames

Takes in an array of usernames in string formatting.

This function will convert up to 100 usernames and will return an array containing arrays. This internal array is in the format of (Key => Value) "username" => Minecraft username (properly capitalized) "uuid" => Minecraft UUID.

ProfileUtils::formatUUID

Takes in an unformatted UUID string and returns a formatted uuid string.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap