Page 1 of 1

[mod] Ban hammer! [banhammer]

PostPosted: Thu Jun 18, 2015 21:25
by Amaz
This mod adds a ban hammer and a kick pick to Minetest. They can be used only by players who have the ban/kick privs. The items are not craftable. I think that's about it!
Slight warning: I have not tested the ban hammer much, so if it bans you from your server when you use it, I'm very sorry!

Image

This requires a -dev version of Minetest from at least the 15th May. (When register_on_punchplayer was added)

Github link: https://github.com/Amaz1/banhammer.git
Download: https://github.com/Amaz1/banhammer/archive/master.zip

Depends: Nothing!

License: WTFPL code and banhammer texture, CC BY-SA 3.0 kick pick texture, based off BlockMen's pick texture.

Re: [mod] Ban hammer! [banhammer]

PostPosted: Thu Jun 18, 2015 22:00
by Evergreen
I actually have already made a mod for this (viewtopic.php?t=9032). What does this do differently?

Re: [mod] Ban hammer! [banhammer]

PostPosted: Fri Jun 19, 2015 07:58
by Amaz
Evergreen wrote:I actually have already made a mod for this (viewtopic.php?t=9032). What does this do differently?

I didn't realize that, sorry!
I think that the code that mine uses is considerably shorter, and it use a function of the api to do it (register_on_punchplayer).

Re: [mod] Ban hammer! [banhammer]

PostPosted: Fri Jun 19, 2015 08:19
by rubenwardy
Amaz wrote:
Evergreen wrote:I actually have already made a mod for this (viewtopic.php?t=9032). What does this do differently?

I didn't realize that, sorry!
I think that the code that mine uses is considerably shorter, and it use a function of the api to do it (register_on_punchplayer).


His uses the hammer's on_use function, which is a better way IMHO.