RecoverInventory || Free || Updates

Status
This thread has been locked.

Cloth

Developer
Supreme
Feedback score
20
Posts
214
Reactions
239
Resources
0

Introduction:

Hello everyone, today I bring you a RecoverInventory plugin.
A few HCF servers currently have plugins similar to this, and I believe it's extremely useful.

What this plugin does:

So, for those of you who don't know what this plugin does here is some info:

- If you've ever played on a PvP server, you know most of them are plagued with hackers. Have you ever died to a hacker and lost your items? Well with this plugin, staff members can use the command '/recover <name>' to restore your last inventory.

- I've also added a command that ties in with '/recover' called '/killer'. It allows you to see the players previous killer. So, if they have a video of a hacker killing them, you can verify it wasn't an old video, and that the person in the video was the latest killer.

Commands and Permission Nodes:
Maybe more coming soon...

/recover <name> - recover.others

/killer <name> - killer.view


Update:
You're now able to recover a players inventory if they're killed by anything. They don't have to be killed by a player. You're still able to check with /killer.


Pictures:

c80540a72ad9e0382ee3bf6861cbb059.png

96080f035585dc1e3a9edb9bcf9afb7b.gif


I would greatly appreciate it if you could leave a vouch after downloading. It helps me out a lot as I am a new user. Click here to download it.

Please notify me if you find any bugs, this is a new plugin. I'd be more than happy to update it. :)
 
Last edited:

Hunting_Potato

Developer
Deactivated
Feedback score
11
Posts
746
Reactions
424
Resources
0
Nice work! I'm sure many people will make good use out of this plugin although I have a few suggestions if you were looking to release a paid version.
1. Make it so you can supply a reason
2. Log all inventory restores with reason and items restored.
3. Create a command to check the 'restore logs' ^
 

Cloth

Developer
Supreme
Feedback score
20
Posts
214
Reactions
239
Resources
0
Nice work! I'm sure many people will make good use out of this plugin although I have a few suggestions if you were looking to release a paid version.
1. Make it so you can supply a reason
2. Log all inventory restores with reason and items restored.
3. Create a command to check the 'restore logs' ^
Appreciate the feedback. Those are some nice ideas that I'd love to work on. Also, for anyone experiencing errors in your console, redownload the plugin. I found the mistake after uploading the plugin and updated it.

Blowns please show me what they're supposed to look like. I pay a lot of attention to small details like that as well and I want my plugins to look as neat as possible. I appreciate you letting me know.
 

Hunting_Potato

Developer
Deactivated
Feedback score
11
Posts
746
Reactions
424
Resources
0
Blowns please show me what they're supposed to look like. I pay a lot of attention to small details like that as well and I want my plugins to look as neat as possible. I appreciate you letting me know.
For a start, package names shouldn't have any capitals.
 

Cloth

Developer
Supreme
Feedback score
20
Posts
214
Reactions
239
Resources
0
Update: Cleaned up conventions. Fixed console bugs and /killer bugs.
 

HyperFierce

Feedback score
1
Posts
110
Reactions
28
Resources
0
How does it track the inventory? Does it just update a save file when a players inventory is changed in any way?
 

Cloth

Developer
Supreme
Feedback score
20
Posts
214
Reactions
239
Resources
0
How does it track the inventory? Does it just update a save file when a players inventory is changed in any way?

Whenever the player dies, I make an ArrayList<ItemStack> or ItemStack[] list = new ItemStack[28] and store their items in there. Then, get the list and store it in the configuration file as "Last_Inventory". Whenever you use the /recover command, it gets their last inventory (inventory they had when the last died) from the config, and adds all of the items to their inventory.
 

HyperFierce

Feedback score
1
Posts
110
Reactions
28
Resources
0
That is so cool. So you have fixed any console errors that were happening before? It still saves if the player logs off and back on? Or if the player puts other items in their inventory? Say i died, I /home'd and I put on a new set of armor and a stacked inventory. What happens when /recover is performed? I am definitely downloading. I like your creativity man.
 

Cloth

Developer
Supreme
Feedback score
20
Posts
214
Reactions
239
Resources
0
That is so cool. So you have fixed any console errors that were happening before? It still saves if the player logs off and back on? Or if the player puts other items in their inventory? Say i died, I /home'd and I put on a new set of armor and a stacked inventory. What happens when /recover is performed? I am definitely downloading. I like your creativity man.
I appreciate it a lot. So, the /recover command is usually only allowed to be executed by staff members. In order to get your inventory recovered, you must provide proof to the staff member that you died by a hacker. Then, the staff member will use the command. Usually, if someone uses the /recover command on you, you will know that they are going to use it. So, you will already have your inventory cleared for item space. If your inventory is full, I'm not sure whether it replaces the items or deletes the items of your previous inventory. That's an interesting topic that I've not looked into. Feel free to mess around with it yourself and let me know what you find. Also, any suggestions will be taken into consideration for future updates. :)
 

HyperFierce

Feedback score
1
Posts
110
Reactions
28
Resources
0
Ok cool. Yea, I was just wondering because sometimes on small servers Opped/admins are not around. So players keep on playing. They have no choice. So what if a player dies again? More than once? You know, maybe a slightly bigger inventory storage option will suffice? Idk, I cant code just yet. I am just trying to think of things that might cause issues later. You are definitely right though. Also, do you know if command can be typed form console? Or does it have to be an in game admin/opped player?
 

Cloth

Developer
Supreme
Feedback score
20
Posts
214
Reactions
239
Resources
0
Ok cool. Yea, I was just wondering because sometimes on small servers Opped/admins are not around. So players keep on playing. They have no choice. So what if a player dies again? More than once? You know, maybe a slightly bigger inventory storage option will suffice? Idk, I cant code just yet. I am just trying to think of things that might cause issues later. You are definitely right though. Also, do you know if command can be typed form console? Or does it have to be an in game admin/opped player?
At the moment I don't believe it can. BUT, there is nothing in the code that prevents me from making it so you can execute it through console. In fact, I'll update the plugin now and the link so that you're able to execute the command via. console. I'll let you know when I've updated so you can download the updated version. :)
 

HyperFierce

Feedback score
1
Posts
110
Reactions
28
Resources
0
Ok cool. i had just downloaded the current version but that is ok. I will download the updated version. Thanks!
 

Cloth

Developer
Supreme
Feedback score
20
Posts
214
Reactions
239
Resources
0
Updated plugin: You can now recover peoples inventory from console.
 

HyperFierce

Feedback score
1
Posts
110
Reactions
28
Resources
0
Got it, thanks man![DOUBLEPOST=1463945309][/DOUBLEPOST]Last question, is this for 1.8 or 1.9 or both? I am at work so I can not test this. Just curious.
 
Last edited:

Cloth

Developer
Supreme
Feedback score
20
Posts
214
Reactions
239
Resources
0
Got it, thanks man![DOUBLEPOST=1463945309][/DOUBLEPOST]Last question, is this for 1.8 or 1.9 or both? I am at work so I can not test this. Just curious.

I've not tested it on 1.9 but I know it works on 1.7 & 1.8 - It should work on 1.9 but if it doesn't let me know.
 

ComputerTurtle

Feedback score
0
Posts
19
Reactions
10
Resources
0
I was actually working on making this exact plugin, + and - some features. Beat me to it!
Looks great, nice job :)
 
Status
This thread has been locked.
Top