Fixed other errors

This commit is contained in:
Cooldude2606
2021-05-06 01:10:54 +01:00
parent 6e00b2cd40
commit ecf2c59bb1
4 changed files with 5 additions and 3 deletions

View File

@@ -157,7 +157,7 @@ Event.add(defines.events.on_pre_player_mined_item, function(event)
local player = game.get_player(event.player_index)
-- Check if the player should be ignored
if config.ignore_admins and player.admin then return end
if entity.last_user.index == player.index then return end
if entity.last_user == nil or entity.last_user.index == player.index then return end
if config.ignore_permission and Roles.player_allowed(player, config.ignore_permission) then return end
-- Check if the entity is protected