diff --git a/src/aiocraft/mc/definitions.py b/src/aiocraft/mc/definitions.py index d931498..a9a2e7e 100644 --- a/src/aiocraft/mc/definitions.py +++ b/src/aiocraft/mc/definitions.py @@ -1,3 +1,4 @@ +import json from math import sqrt from enum import Enum from dataclasses import dataclass @@ -32,6 +33,12 @@ class GameProfile: id : str name : str + def __str__(self): + return json.dumps(self.as_dict(), indent=2) + + def __repr__(self): + return f"GameProfile(id='{self.id}', name='{self.name}')" + def as_dict(self): return { "id": self.id,