diff options
author | Elias Fleckenstein <eliasfleckenstein@web.de> | 2020-06-15 16:24:06 +0200 |
---|---|---|
committer | Elias Fleckenstein <eliasfleckenstein@web.de> | 2020-06-15 16:24:06 +0200 |
commit | 165071e2aa050ab3228cd8fe20dd41c1f850a5eb (patch) | |
tree | 5490b7d62dc25f70aca35266acbd76271df9fc0b /src/main | |
parent | 444d6e653c65baaf9b1376534a58cf4b92d9a8e2 (diff) | |
download | skycraft-165071e2aa050ab3228cd8fe20dd41c1f850a5eb.tar.xz |
Fixed Spawners
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/plots.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/plots.lua b/src/main/plots.lua index 2d6c67e..6ac909f 100644 --- a/src/main/plots.lua +++ b/src/main/plots.lua @@ -58,6 +58,7 @@ local plot_commands = { gui = function(name, message) message = message or "" local plot = skycraft.get_plot_by_player(name) + if not plot then return false, "You don't have a plot yet" end local esc = minetest.formspec_escape local formspec = "size[8,10]" .. "label[2.5,0;" .. esc("-- Plot interface --") .. "]" @@ -172,7 +173,7 @@ end) local old_is_protected = minetest.is_protected function minetest.is_protected(pos, name) local plot = skycraft.get_plot_at_pos(pos) or {members = {}} - if pos.y > 5000 or (pos.y < 1000 and pos.y > -100) or plot.owner ~= name and table.indexof(plot.members, name) == -1 then + if pos.y > 5000 or (pos.y < 1000 and pos.y > -100) or (plot.owner ~= name and table.indexof(plot.members, name) == -1) then return not minetest.check_player_privs(name, {protection_bypass = true}) else return old_is_protected(pos, name) |