从Mojang API获取Minecraft玩家信息。

mcuuid的Python项目详细描述


mcuuid

从Mojang API获取Minecraft玩家信息

用法

  1. pip install mcuuid
  2. 使用如下模块:

api

from mcuuid.api import GetPlayerData

player = GetPlayerData(identifier)

if player.valid is True:
    uuid = player.uuid
    name = player.username

标识符可以是用户名或uuid。

identifier = "gronkh"时: uuid将是"a2080281c2784181b961d99ed2f3347c"name将是"Gronkh"

player = GetPlayerData(identifier, timestamp)

有些名字是时间敏感的。(更改时) 所以你可以选择一个特殊的时间

它甚至可以和uuid一起工作他们在给定的时间响应用户名

工具

用户名的语法检查

from mcuuid.tools import is_valid_minecraft_username

if is_valid_minecraft_username('gronkh'):
  print('Valid')

UUID的综合检查

from mcuuid.tools import is_valid_mojang_uuid

if is_valid_mojang_uuid('a2080281c2784181b961d99ed2f3347c'):
  print('Valid')

测试文件

用法

$ python test.py gronkh

$ python test.py a2080281c2784181b961d99ed2f3347c

$ python test.py
Please enter a username or UUID:
gronkh

$ python test.py
Please enter a username or UUID:
a2080281c2784181b961d99ed2f3347c

响应:

UUID: a2080281c2784181b961d99ed2f3347c
correct name: Gronkh

许可证

这个软件是根据麻省理工学院的许可证授权的你想怎么用就怎么用

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java API以编程方式创建ARM模板   java是否有合适的模式或方法来遍历数据和动态构造对象?   oop((类名)InstanceName)在java中有什么用途?   接口Java类方法未初始化   Java类:静态字段在内存中的位置?   java错误:服务类没有零参数构造函数   使用JDBC模板的java参数化sql查询   安卓致命异常:主java。lang.RuntimeException:   amazon web服务使用IAM角色从java访问AWS S3   java如何在Gradle中使用ojdbc   带块的Java类实例化   java日志记录是否有很大的开销,即使它是关闭的?   java JetBrains@Contract using字段   BluetoothGattCallback中从未调用java onDescriptorWrite()   java HttpMessageConverter无效的EOF处理   java在安卓的主活动类中调用另一个类   java防止在spring hibernate中存储重复值的正确方法   java如何在JAVADOC注释中使用变量?