[Mod][Admin Tool] Inventory Management [0.2]

User avatar
Sirvoid
Member
 
Posts: 47
Joined: Thu Feb 04, 2016 22:12
GitHub: Sirvoid
IRC: Sirvoid
In-game: Sirvoid

[Mod][Admin Tool] Inventory Management [0.2]

by Sirvoid » Sun Jan 01, 2017 21:55

A small tool for admins to manage there players inventory.

Features
- "/clearinv <Player>" To clear a player inventory
-"/copyinv <Player>" To copy a player inventory and paste it in your inventory. (Useful to see if someone is stealing)
-"/setinv <player> <slot> <item> <value> " to add items to a player in a specific slot.
(I am open to any suggestions)

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
-----v0.2------
-Added /setinv to add items to a player in a specific slot.



Github
Download

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
Licence: WTFPL

DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE

Version 2, December 2004

Copyright (C) 2004 Sam Hocevar sam@hocevar.net

Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed.
Last edited by Sirvoid on Mon Jan 02, 2017 22:05, edited 1 time in total.
 

User avatar
DS-minetest
Member
 
Posts: 707
Joined: Thu Jun 19, 2014 19:49
GitHub: DS-Minetest
In-game: DS

Re: [Mod][Admin Tool] Inventory Management [0.1]

by DS-minetest » Mon Jan 02, 2017 13:28

What about a "/setinv <player> <slot> <item>"?
Do not call me -minetest.
Call me DS or DS-minetest.
I am German, so you don't have to pm me English if you are also German.
The background is a lie.
 

User avatar
Sirvoid
Member
 
Posts: 47
Joined: Thu Feb 04, 2016 22:12
GitHub: Sirvoid
IRC: Sirvoid
In-game: Sirvoid

Re: [Mod][Admin Tool] Inventory Management [0.1]

by Sirvoid » Mon Jan 02, 2017 22:07

DS-minetest wrote:What about a "/setinv <player> <slot> <item>"?


I added it ! thanks for the suggestion ^^
 

User avatar
Krock
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker

Re: [Mod][Admin Tool] Inventory Management [0.2]

by Krock » Tue Jan 03, 2017 09:51

Is there any way to see the contents of that player's inventory in a formspec?
Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 

User avatar
Sirvoid
Member
 
Posts: 47
Joined: Thu Feb 04, 2016 22:12
GitHub: Sirvoid
IRC: Sirvoid
In-game: Sirvoid

Re: [Mod][Admin Tool] Inventory Management [0.2]

by Sirvoid » Tue Jan 03, 2017 18:14

Krock wrote:Is there any way to see the contents of that player's inventory in a formspec?


I was thinking about that when I made the copyinv but I didn't go further.
I will check what I can do for that.
 

Foz
Member
 
Posts: 17
Joined: Sat Sep 27, 2014 02:53

Re: [Mod][Admin Tool] Inventory Management [0.2]

by Foz » Wed Jan 04, 2017 19:31

Krock wrote:Is there any way to see the contents of that player's inventory in a formspec?


I've been trying to figure this out too. There is an inventory location player:<name>, but it is only available to the player with that name. It seems to be exactly the same as current_player.

from #minetest-dev:
sfan5 wrote:i'm not even sure why we have the player:<name> thing since we also have current_player
 

User avatar
octacian
Member
 
Posts: 408
Joined: Mon Dec 21, 2015 22:18
GitHub: octacian
IRC: octacian
In-game: octacian

Re: [Mod][Admin Tool] Inventory Management [0.2]

by octacian » Thu Jan 05, 2017 01:47

Nice Work! I was going to attempt some type of thing to see a player's inventory in a formspec myself for servertools, but haven't gotten around to it.

Also see this PR. Assuming it gets merged (who knows if it will, I just opened it a few minutes ago), you might want to add a check to only attempt to register /clearinv if the command doesn't already exist. IDK what happens when you try and register a duplicate, but...

Anyways, still, really great work.
God isn't dead!

My Coolest Mods:
MicroExpansion, Working Computers, Interchangeable Hands

Check out my YouTube channel! (octacian)
 


Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 13 guests

cron