forked from MineClone5/MineClone5
#198 Fix a crash, step 28
This commit is contained in:
parent
989d46cc5b
commit
4ab521ddc8
|
@ -560,7 +560,7 @@ function mcl_enchanting.handle_formspec_fields(player, formname, fields)
|
|||
return
|
||||
end
|
||||
local player_level = mcl_experience.get_level(player)
|
||||
if player_level < slot.level_requirement then
|
||||
if not player_level or (player_level < slot.level_requirement) then
|
||||
return
|
||||
end
|
||||
mcl_experience.set_level(player, player_level - button_pressed)
|
||||
|
|
Loading…
Reference in New Issue