specify is not None
This commit is contained in:
parent
416b545e46
commit
f35f9d5434
1 changed files with 1 additions and 1 deletions
|
@ -126,7 +126,7 @@ class Enchantment:
|
|||
level : int
|
||||
|
||||
def __init__(self, type:EnchantmentType=None, id:int=None, lvl:int=1):
|
||||
if not type and not id:
|
||||
if type is None and id is None:
|
||||
raise ValueError("No enchantment type or enchantment id provided")
|
||||
self.type = type or EnchantmentType(id)
|
||||
self.eid = self.type.value
|
||||
|
|
Loading…
Reference in a new issue