summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2018-05-22 19:51:01 +0100
committerTenPlus1 <kinsellaja@yahoo.com>2018-05-22 19:51:01 +0100
commitf971ffef04b0c36f0448c5585899572d3564094c (patch)
treefe7a3339a9899c2dbd356993e4ad0c968db95206
parent3176cd51279a3b150ea39e2e90e4a7aa31b73dc8 (diff)
fix creative check for hoebomb
-rw-r--r--hoebomb.lua9
1 files changed, 1 insertions, 8 deletions
diff --git a/hoebomb.lua b/hoebomb.lua
index 05e939b..be8f828 100644
--- a/hoebomb.lua
+++ b/hoebomb.lua
@@ -4,13 +4,6 @@ local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
--- creative check
-local creative_mode_cache = minetest.settings:get_bool("creative_mode")
-function is_creative(name)
- return creative_mode_cache or minetest.check_player_privs(name, {creative = true})
-end
-
-
-- hoe bomb function
local function hoe_area(pos, player)
@@ -138,7 +131,7 @@ minetest.register_craftitem("farming:hoe_bomb", {
else
throw_potion(itemstack, user)
- if not is_creative(user:get_player_name()) then
+ if not farming.is_creative(user:get_player_name()) then
itemstack:take_item()