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
|
return
|
||||||
end
|
end
|
||||||
local player_level = mcl_experience.get_level(player)
|
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
|
return
|
||||||
end
|
end
|
||||||
mcl_experience.set_level(player, player_level - button_pressed)
|
mcl_experience.set_level(player, player_level - button_pressed)
|
||||||
|
|
Loading…
Reference in New Issue