Page 1 of 1

[Mod] Server Essentials [serveressentials]

Posted: Wed Jun 03, 2015 21:50
by GunshipPenguin
This mod adds a variety of useful commands and features for use by Minetest server administrators.

Some of the commands included, see the README for all
  • /clearinv - Clear your inventory
    /godmode - Toggle godmode (infinite health and breath)
    /kill - Kill player
    /killme - Kill self
    /heal - Heal self or other player
    /broadcast - Broadcast message to entire server
    /top - Teleport to topmost non air block at current y position
    /gettime - Get current time of day
    /spawn - Teleport to static spawnpoint, if set
    /setspeed - Set your or other player's speed
    /whatisthis - Get itemstring of currently wielded item
    /whois - Get network information of specified player
Some other features included, see the README for all
  • Auto afk Kicking - Kick players who are afk for a specified period of time
    First Time Join Message - Broadcast a message when a player joins for the first time

    Much of this mod is configurable, see settings.lua for more info.

    Dependencies: None
    Licence: CC0

    Github: http://github.com/gunshippenguin/serveressentials

Re: [Mod] Server Essentials [serveressentials]

Posted: Wed Jun 03, 2015 22:54
by programmingchicken
Woah.

Re: [Mod] Server Essentials [serveressentials]

Posted: Thu Jun 04, 2015 05:04
by jordan4ibanez
THAT'S AWESOME!
I have a suggestion:
/ping - sends back PONG!
/whisper - only send a message to a specific user
/tpa - teleport to a specific player. They have to do /tpaaccept or /tpadeny.
/spawn - go to spawn

:D

Re: [Mod] Server Essentials [serveressentials]

Posted: Thu Jun 04, 2015 07:56
by rubenwardy
Suggestions:

/healme
/wit as an alias for /whatisthis
/bcast as an alias for /broadcast

Re: [Mod] Server Essentials [serveressentials]

Posted: Sat Jun 06, 2015 05:41
by GunshipPenguin
rubenwardy wrote:Suggestions:

/healme
/wit as an alias for /whatisthis
/bcast as an alias for /broadcast
When run without arguments, /heal will heal the player who issued the command.

Is there a simple way to make a command an alias to another one using the API? If so I'll definitely include the aliases you suggested.
jordan4ibanez wrote:THAT'S AWESOME!
I have a suggestion:
/ping - sends back PONG!
/whisper - only send a message to a specific user
/tpa - teleport to a specific player. They have to do /tpaaccept or /tpadeny.
/spawn - go to spawn

:D
/ping - Added
/whisper - Already provided by the /msg command
/spawn - Already included
/tpa - Will add soon :)

Re: [Mod] Server Essentials [serveressentials]

Posted: Sat Jun 06, 2015 21:47
by rubenwardy

Code: Select all

local function cmd(name, params)
    stuff here
end

minetest.register_chatcommand("one", {
    func = cmd
})

minetest.register_chatcommand("two", {
    func = cmd
})

Re: [Mod] Server Essentials [serveressentials]

Posted: Tue Aug 11, 2015 05:39
by amadin
Do you can add a time delay to spawn teleport? It will be good for pvp servers.

Re: [Mod] Server Essentials [serveressentials]

Posted: Sat Aug 29, 2015 22:43
by GunshipPenguin
amadin wrote:Do you can add a time delay to spawn teleport? It will be good for pvp servers.
Added

Re: [Mod] Server Essentials [serveressentials]

Posted: Sat Oct 17, 2015 02:57
by kidmondo
Noob question but how do I set spawn?

Re: [Mod] Server Essentials [serveressentials]

Posted: Sat Oct 17, 2015 02:59
by programmingchicken
kidmondo wrote:Noob question but how do I set spawn?
settings.lua

Re: [Mod] Server Essentials [serveressentials]

Posted: Sat Oct 17, 2015 03:41
by kidmondo
programmingchicken wrote:
kidmondo wrote:Noob question but how do I set spawn?
settings.lua
That still didn't work :/

Re: [Mod] Server Essentials [serveressentials]

Posted: Sat Oct 17, 2015 05:57
by GunshipPenguin
kidmondo wrote:
programmingchicken wrote:
kidmondo wrote:Noob question but how do I set spawn?
settings.lua
That still didn't work :/
I assume you're talking about the /spawn command. It teleports you to the static spawnpoint, which is set in minetest.conf (see the static_spawnpoint setting). If static_spawnpoint is not set in minetest.conf, /spawn will not be available.

Re: [Mod] Server Essentials [serveressentials]

Posted: Mon Oct 19, 2015 03:41
by swordpaint12
+3 Me likey.

Re: [Mod] Server Essentials [serveressentials]

Posted: Sat Nov 21, 2015 20:05
by amadin
Do you can add an option for using /spawn only once in 15 minutes (for example)?

Re: [Mod] Server Essentials [serveressentials]

Posted: Sat Nov 21, 2015 21:30
by asanetargoss
I've found the /whatisthis command to be very useful.

Re: [Mod] Server Essentials [serveressentials]

Posted: Wed Jan 11, 2017 10:06
by ManElevation
kidmondo wrote:Noob question but how do I set spawn?
kidmondo add this mod, than go to were you want the spawn to be and do /setspawn.
after that when you die or you do the /spawn command you will teleport there

Code: Select all

local spawn_spawnpos = minetest.setting_get_pos("static_spawnpoint")

minetest.register_chatcommand("spawn", {
	params = "",
	description = "Teleport to the spawn point",
	func = function(name, param)
		local player = minetest.get_player_by_name(name)
		if not player then
			return false, "Player not found"
		end
		if spawn_spawnpos then
			player:setpos(spawn_spawnpos)
			return true, "Teleporting to spawn..."
		else
			return false, "The spawn point is not set!"
		end
	end,
})

minetest.register_chatcommand("setspawn", {
	params = "",
	description = "Sets the spawn point to your current position",
	privs = { server=true },
	func = function(name, param)
		local player = minetest.get_player_by_name(name)
		if not player then
			return false, "Player not found"
		end
		local pos = player:getpos()
		local x = pos.x
		local y = pos.y
		local z = pos.z
		local pos_string = x..","..y..","..z
		local pos_string_2 = "Setting spawn point to ("..x..", "..y..", "..z..")"
		minetest.setting_set("static_spawnpoint",pos_string)
		spawn_spawnpos = pos
		minetest.setting_save()
		return true, pos_string_2
	end,
})

Re: [Mod] Server Essentials [serveressentials]

Posted: Fri Jan 13, 2017 20:28
by ektor
I'll give a try to this usefull mod !
The /gettime - Get current time of day is not the same result as the /time command ?

Re: [Mod] Server Essentials [serveressentials]

Posted: Wed Feb 14, 2018 22:58
by scottwolff
Yes, I have this implemented on my server. Except that I used a seperate mod when I messed up the privs of new players having that permission to use the spawn command so I commented out the spawn portion.

Re: [Mod] Server Essentials [serveressentials]

Posted: Sun Oct 07, 2018 07:29
by Piezo_
ManElevation wrote: kidmondo add this mod, than go to were you want the spawn to be and do /setspawn.
after that when you die or you do the /spawn command you will teleport there
Sorry for necroposting, but this setspawn mod is exactly what I need for my server. May I use it on its own, and under what license?

Re: [Mod] Server Essentials [serveressentials]

Posted: Sun Oct 07, 2018 11:44
by ManElevation
Piezo_ wrote: Sorry for necroposting, but this setspawn mod is exactly what I need for my server. May I use it on its own, and under what license?
the mod was originally made by cheapie/spawn but he removed the mod, the license was GNU and
in the readme it exactly said...

Code: Select all

--Spawn mod for Minetest
--Originally written by VanessaE (I think), rewritten by cheapie
--WTFPL

Re: [Mod] Server Essentials [serveressentials]

Posted: Sun Oct 07, 2018 18:19
by Piezo_
ManElevation wrote:
Piezo_ wrote: Sorry for necroposting, but this setspawn mod is exactly what I need for my server. May I use it on its own, and under what license?
the mod was originally made by cheapie/spawn but he removed the mod, the license was GNU and
in the readme it exactly said...

Code: Select all

--Spawn mod for Minetest
--Originally written by VanessaE (I think), rewritten by cheapie
--WTFPL
So, is it GNU or WTFPL?

I'll go with GNU, as WTFPL is a pushover license, and wouldn't stop me if it were the case, but I'd still like to know.