Fixed infinite claiming bug

This commit is contained in:
shamoanjac 2016-08-08 23:36:56 +02:00
parent 48139c5877
commit 719b39d99b

View File

@ -161,7 +161,7 @@ factions.register_command ("claim", {
description = "Claim the plot of land you're on.", description = "Claim the plot of land you're on.",
on_success = function(player, faction, pos, chunkpos, args) on_success = function(player, faction, pos, chunkpos, args)
local chunk = factions.chunks[chunkpos] local chunk = factions.chunks[chunkpos]
if not chunk then if not chunk and faction:can_claim_chunk(chunkpos) then
minetest.chat_send_player(player, "Claming chunk "..chunkpos) minetest.chat_send_player(player, "Claming chunk "..chunkpos)
faction:claim_chunk(chunkpos) faction:claim_chunk(chunkpos)
return true return true