Bug fix: admin factions should not kill players that spawn on them.

New players die at spawn because it is claimed by admin faction.
This commit is contained in:
Coder12a 2018-11-19 10:07:49 -06:00
parent 18343b8fab
commit 76166c527f
2 changed files with 2 additions and 1 deletions

View File

@ -684,6 +684,7 @@ factions.register_command("setadmin", {
format = {"faction"},
on_success = function(player, faction, pos, parcelpos, args)
args.factions[1].is_admin = false
factions.save()
return true
end
},false)

View File

@ -985,7 +985,7 @@ function(player)
local parcel_faction = factions.get_faction_at(pos)
if parcel_faction then
if parcel_faction and parcel_faction.is_admin == false then
if not faction or parcel_faction.name ~= faction.name then
minetest.after(1, function()
if player then