forked from Kimapr/nodecore-skyblock
add player island /query
This commit is contained in:
parent
cac6367d90
commit
bef0202358
|
@ -543,7 +543,18 @@ minetest.register_chatcommand("invalidate", {
|
||||||
minetest.register_chatcommand("query", {
|
minetest.register_chatcommand("query", {
|
||||||
description = S"Query information about this island",
|
description = S"Query information about this island",
|
||||||
func = function(name,param)
|
func = function(name,param)
|
||||||
local is = get_standing_island(name)
|
local is
|
||||||
|
if param then
|
||||||
|
is = players[param]
|
||||||
|
if not is then
|
||||||
|
minetest.chat_send_player(name,S("Can't find @1's island",param))
|
||||||
|
return
|
||||||
|
end
|
||||||
|
is = {pos=is.pos,valid=is.valid,owner=param}
|
||||||
|
end
|
||||||
|
if not is then
|
||||||
|
is = get_standing_island(name)
|
||||||
|
end
|
||||||
if is then
|
if is then
|
||||||
minetest.chat_send_player(name,"[")
|
minetest.chat_send_player(name,"[")
|
||||||
minetest.chat_send_player(name," owner: "..((is.owner == "" and "(none)" or is.owner) or "(none)"))
|
minetest.chat_send_player(name," owner: "..((is.owner == "" and "(none)" or is.owner) or "(none)"))
|
||||||
|
|
|
@ -16,3 +16,4 @@ Get a new island=Get a new island
|
||||||
Bulk island generation=Bulk island generation
|
Bulk island generation=Bulk island generation
|
||||||
Island generation done=Island generation done
|
Island generation done=Island generation done
|
||||||
Generated an island (@1%)=Generated an island (@1%)
|
Generated an island (@1%)=Generated an island (@1%)
|
||||||
|
Can't find @1's island=Can't find @1's island
|
||||||
|
|
Loading…
Reference in New Issue