oops kwarg

This commit is contained in:
əlemi 2022-01-14 16:34:26 +01:00
parent bdd7160dde
commit 44db6927c4

View file

@ -125,10 +125,10 @@ class Enchantment:
type : EnchantmentType
level : int
def __init__(self, type:EnchantmentType=None, eid:int=None, level:int=1):
if not type and not eid:
def __init__(self, type:EnchantmentType=None, id:int=None, level:int=1):
if not type and not id:
raise ValueError("No enchantment type or enchantment id provided")
self.type = type or EnchantmentType(eid)
self.type = type or EnchantmentType(id)
self.eid = self.type.value
self.level = level