Ejemplo n.º 1
0
 def update_minecraft_username(self):
     self.minecraft_username = MojangAPI.get_username(self.minecraft_id)
     update_players_minecraft_username(self.minecraft_username,
                                       self.minecraft_id)
     return self.minecraft_username
Ejemplo n.º 2
0
from mojang import MojangAPI
print(
    'ys////////////////////////////////////sy\nyo                                    oy\nyo                                    oy\nyo             oooooooooo             oy\nyo             yyyyyyyyyy             oy\nyo             yyyyyyyyyy             oy\nyo             yyyyyyyyyy             oy\nyo   ``````````yyyyyyyyyy``````````   oy\nyo   ssssssssssyyyyyyyyyyssssssssss   oy\nyo   yyyyyyyyyyyyyyyyyyyyyyyyyyyyyy   oy\nyo   yyyyyyyyyyyyyyyyyyyyyyyyyyyyyy   oy\nyo   yyyyyyyyyyyyyyyyyyyyyyyyyyyyyy   oy\nyo   ``````````yyyyyyyyyy``````````   oy\nyo             yyyyyyyyyy             oy\nyo             yyyyyyyyyy             oy\nyo             yyyyyyyyyy             oy\nyo             oooooooooo             oy\nyo                                    oy\nyo                                    oy\nys////////////////////////////////////sy\n\n\n'
)
print(
    '1) Username to uuid.\n2) Uuid to username.\n3)Username/Uuid to skin url.\n4) Username/uuid to cape.'
)
selection = input()
if selection == '3':
    username_or_uuid = input(
        "Type 'user' to use username to find skin, or type uuid to find skin with your uuid"
    )
    if username_or_uuid == 'user':
        username_or_uuid_username = input("Enter your username")
        uuid_get = MojangAPI.get_uuid(username_or_uuid_username)
        profile_skin = MojangAPI.get_profile(uuid_get)
        print('The skin url is: ', profile_skin.skin_url)
    elif username_or_uuid == 'uuid':
        uuid_input = input('Enter uuid: ')
        profile_skin_uuid = MojangAPI.get_profile(uuid_input)
        print('The skin url is: ', profile_skin_uuid.skin_url)

if selection == '1':
    username_input = input('Enter your current minecraft username: '******'There uuid is: ' + uuid)

if selection == '2':
Ejemplo n.º 3
0
import requests
from mojang import MojangAPI

api_key = "INSERT-YOUR-UUID"

userinput = str(input("Enter your minecraft username >>> "))

uuid = MojangAPI.get_uuid(userinput)
requestlink = f"https://api.hypixel.net/player?key={api_key}&uuid={uuid}"

hydata = requests.get(requestlink).json()

player = hydata["player"]["displayname"]

karma = hydata["player"]["karma"]
karma = "{:,}".format(karma)

print(f"{player} has {karma} karma")

logouttime = hydata['player']['lastLogout']
logintime = hydata['player']['lastLogin']

if logouttime < logintime:
    print(f'{player} is currently online')
else:
    print(f'{player} is currently offline')

try:
    rank = hydata['player']['newPackageRank']

    try: