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

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

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

by Sirvoid » Post

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)

Code: Select all

-----v0.2------
-Added /setinv to add items to a player in a specific slot.

Github
Download

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: 1137
Joined: Thu Jun 19, 2014 19:49
GitHub: Desour
IRC: DS-minetest
In-game: DS
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.

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

by DS-minetest » Post

What about a "/setinv <player> <slot> <item>"?
Note that I've recently renamed myself on github and co. to "Desour". (I'm bad at naming things.)
Feel free to call me DS.

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

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

by Sirvoid » Post

DS-minetest wrote:What about a "/setinv <player> <slot> <item>"?
I added it ! thanks for the suggestion ^^

User avatar
Krock
Developer
Posts: 4511
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

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

by Krock » Post

Is there any way to see the contents of that player's inventory in a formspec?
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

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

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

by Sirvoid » Post

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: 20
Joined: Sat Sep 27, 2014 02:53

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

by Foz » Post

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: 594
Joined: Mon Dec 21, 2015 22:18
GitHub: octacian
IRC: octacian
In-game: octacian
Location: Canada

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

by octacian » Post

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.
MicroExpansion, Working Computers, All Projects - Check out my YouTube channel! (octacian)
I'm currently inactive in the Minetest community! So if I don't respond, that's why.

User avatar
apienk
Member
Posts: 26
Joined: Tue Mar 10, 2015 15:38
GitHub: apienk
In-game: apienk

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

by apienk » Post

Why

Code: Select all

invmanage
is not listed in privs?

User avatar
AiTechEye
Member
Posts: 788
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: ¯\_(ツ)_/¯

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

by AiTechEye » Post

see/take from players inventory [invhack]

viewtopic.php?t=12440

User avatar
BirgitLachner
Member
Posts: 383
Joined: Thu May 05, 2016 10:18
In-game: Bibs

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

by BirgitLachner » Post

What's about the possibility to remove a special piece?

May be give a player a cart to use it on as a train and then remove the cart with the command in a command block.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 2 guests