forked from Kimapr/nodecore-skyblock
no cooldown for admins
This commit is contained in:
parent
d6dfd0b453
commit
1e2e9721e6
|
@ -497,13 +497,15 @@ minetest.register_chatcommand("reset",{
|
||||||
description = S"Get a new island",
|
description = S"Get a new island",
|
||||||
privs = {interact = true},
|
privs = {interact = true},
|
||||||
func = function(name)
|
func = function(name)
|
||||||
local utime = minetest.get_server_uptime()
|
if not minetest.check_player_privs(name,{server=true}) then
|
||||||
local cd = cooldowns[name]
|
local utime = minetest.get_server_uptime()
|
||||||
if cd and cd > utime then
|
local cd = cooldowns[name]
|
||||||
minetest.chat_send_player(name,S("You can't get a new island yet. Wait @1 secs.",(cd-utime)))
|
if cd and cd > utime then
|
||||||
return
|
minetest.chat_send_player(name,S("You can't get a new island yet. Wait @1 secs.",(cd-utime)))
|
||||||
|
return
|
||||||
|
end
|
||||||
|
cooldowns[name] = utime + cooldown
|
||||||
end
|
end
|
||||||
cooldowns[name] = utime + cooldown
|
|
||||||
local is = players[name]
|
local is = players[name]
|
||||||
if is then
|
if is then
|
||||||
players[name] = nil
|
players[name] = nil
|
||||||
|
|
Loading…
Reference in New Issue