[mod] Ban hammer! [banhammer]

Amaz
Member
 
Posts: 343
Joined: Wed May 08, 2013 08:26
GitHub: Amaz1
IRC: Amaz
In-game: Amaz

[mod] Ban hammer! [banhammer]

by Amaz » Thu Jun 18, 2015 21:25

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.
 

User avatar
Evergreen
Member
 
Posts: 2135
Joined: Sun Jan 06, 2013 01:22
Location: A forest in the midwest
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

Re: [mod] Ban hammer! [banhammer]

by Evergreen » Thu Jun 18, 2015 22:00

I actually have already made a mod for this (viewtopic.php?t=9032). What does this do differently?
Back from the dead!
 

Amaz
Member
 
Posts: 343
Joined: Wed May 08, 2013 08:26
GitHub: Amaz1
IRC: Amaz
In-game: Amaz

Re: [mod] Ban hammer! [banhammer]

by Amaz » Fri Jun 19, 2015 07:58

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).
 

User avatar
rubenwardy
Moderator
 
Posts: 5545
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: [mod] Ban hammer! [banhammer]

by rubenwardy » Fri Jun 19, 2015 08:19

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.
 


Return to WIP Mods



Who is online

Users browsing this forum: No registered users and 1 guest