Inventory Restore - BEST INVENTORY MANAGEMENT PLUGIN
The source is now included in the default price, no extra payment required. If you have already purchased the plugin, PM me, and I will send you a link to the GitLab (requires account). Please include your GitLab username in the PM.
This is only for a limited amount of time.
Remastered: The plugin has been remastered, hence including new, better, and more innovative systems and features. The thread should be updated with the new photos. Below is the listed changes:
Changes:
- Data is now stored in JSON files for performance purposes. The plugin features a pool system, which will load data from JSON files into memory, only when needed, making it faster accessible. In other words, the plugin doesn't have to read files all the time, instead the data is only loaded into memory if it already hasn't, then removed again if not used in specified amount of time. The cache pool is configurable in the config.yml.
- Pages system. This has been the most requested feature, and it is sad that the plugin didn't feature it. Now though, you can scroll through pages and pages of inventory history-- newest one being listed first and oldest ones found at the end pages.
- Built-in API. Yes, if you purchase the plugin, your developers may use the jar to create add-ons using the built-in API it provides. However, this does not give you the right to -Redacted- and hand the plugin to every developer that contacts you. This is against the TOS, and might end bad for you. Contact me first if you wish to use the API, and I will give you a pass. Further on this is described below.
- Configuration. I am not a big fan of making configurable plugins, don't take it personal. However, I believe that a successful plugin like this should feature it, and I also understand why you want it so bad.
- Re-designed GUI. The GUI has been redesigned a little bit, to something I believe looks a bit nicer.
- Text-change. I have decided to change the colors and formatting of the text.
✓ = completed
- ✓ I am looking to create a language file (the lang is generated, but contains nothing). Look forward to the next update!
Video:
- For the ones who are too lazy to read the whole thread to get the main functionality. I need updated videos, PM me!
By: @Notifyz
OUTDATED
By: @VipFTW
Price/Purchase:
- Copy: 4 USD
- Source: 15 USD (free for the moment)
How to get source: PM me!
Proof of ownership:
Additional Info:
This is a complete new version of Inventory Restore+. Made even better To support death history. Now can't you only restore the player's most recent inventory, but also an inventory he had a month ago, too! User friendly dates. ID system.
Commands & Permissions:
<> = required
[] = optional
- /invrestore <player> [reason] | invrestore.staff | - restore a player's inventory! This is also the permission to receive the notification that a staff has restored a player's inventory with the Date and Reason.
- --
Servers that uses this plugin:
- Hydra Network
- OpPvP - play.oppvp.eu
- 0tx.org
- PLAY.MITECRAFT.COM
Features:
- Effective code
- Extremely good data management
- Permissions
- History save
- Much more!
config.yml
Code:
# Made by the one and only loved ExpDev
# Do you miss this config file? ;)
# <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3
# First of, I just wanna say thank you for purchasing this plugin! If you have
# not paid for it, and got it from a shady place, then shame on you. I also want
# to thank all the people who have supported and bought this plugin from the
# beggining. You have been patient with your requests, and I have been busy.
# You deserve a new, and better version. :)
# <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3
# Leave this off, or some testing commands will become available
# Console will also get spammy with logging messages. Ideally a tool
# for developers :p
developerMode: false
############################################################
# +------------------------------------------------------+ #
# | CACHE DATA | #
# +------------------------------------------------------+ #
############################################################
# Saving data / caching system
# Note: measured in seconds
cache:
# Save every...
# If your server crashes a lot, bump it down, might also cause lag
saveEvery: 120
# Save on restart?
# Data will be serialized to respective files (.json)
restart: true
# Cache objects for (I suggest you leave it as it is)...
# Bump this up if you have a lot of CPU power and RAM
cacheFor: 600
# How many objects to keep in memory at the same time
# Bump this up if you have a lot of RAM
cacheMaxSize: 1000
############################################################
# +------------------------------------------------------+ #
# | RESTORE | #
# +------------------------------------------------------+ #
############################################################
restore:
# Keep the inventory history even after it is restored?
keepHistory: false
# What should the default reason be if no reason was specified?
defaultReason: 'Misconduct.'
# Save inventory history if the player died with an empty inventory
# Honestly don't know why this is an option
saveEmptyInv: false
players.json
As you can see, the armor and contents is a encoded base64 string instead of a serialized direct ItemStack. This will save space on your machine. You can use a base64 decoder to decode it, but don't worry, the plugin does this for you
Code:
{
"uuid": {
"id": "uuid",
"name": "Name",
"restores": {
"timestamp2312343535": {
"timestamp": 2312343535,
"armor": "encoded-base64-string",
"contents": "encoded-base64-string"
},
"timestamp54643333": {
"timestamp": 54643333,
"armor": "encoded-base64-string",
"contents": "encoded-base64-string"
}
}
},
"uuid2": {
"id": "uuid2",
"name": "Name2",
"restores": {
"timestamp563453534": {
"timestamp": 563453534,
"armor": "encoded-base64-string",
"contents": "encoded-base64-string"
}
}
}
}
plugin.yml
Code:
name: InvRestore2
author: ExpDev
version: 2.0
main: me.expdev.invrestore.InvRestorePlugin
description: A remaster of InventoryRestore+ at spigotmc by same Author.
commands:
invtest:
description: For testing, don't use.
invrestore:
description: Restore a player's inventory from their history.
API:
If you have developers, you are probably excited about this. First of, I just wanna say as stated earlier in this thread, you are not permitted to just give the jar to any developer or person. Consult with me first, unless you are a developer yourself and own a copy of the plugin through purchasing.
Here's an example of how to use the API:
Code:
import me.expdev.invrestore.api.InvRestoreAPI;
import me.expdev.invrestore.data.RInventory;
import me.expdev.invrestore.data.RPlayer;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.inventory.PlayerInventory;
/**
* Created by Marius on 23/01/2017. All rights
* are reserved unless explicitly states otherwise
* in release of the actual product (referring to
* the source code contained within these folders)
*/
public class Test {
public static void main(String[] strings) {
String name = "ExpDev";
Player p = Bukkit.getPlayer(name);
// The player data is saved in an object called RPlayer
RPlayer rPlayer;
if(p == null) {
// Get a RPlayer object from a player's name
rPlayer = InvRestoreAPI.getPlayer(name);
} else {
// Get a RPlayer object from a player's UUID
// This is more reliable
rPlayer = InvRestoreAPI.getPlayer(p.getUniqueId());
}
if(rPlayer == null) {
System.out.println("InvRestore does not have any data for " + name);
} else {
// Java timestamp in milliseconds. If the player had a inventory saved at
// 23423423423 milliseconds, then it will return it
long stamp = 23423423423L;
// The inventory save data is stored in a RInventory object
// The getRestores() method returns a TreeMap, this includes all of the player's saves
RInventory invAtStamp = rPlayer.getRestores().get(stamp);
if(invAtStamp == null) {
System.out.println("The player does not have a inventory save for that time");
} else {
PlayerInventory pinv = p.getInventory();
// A simple way to give the player the save
pinv.setContents(invAtStamp.getContents());
pinv.setArmorContents(invAtStamp.getArmor());
// Removing the save from the map
rPlayer.getRestores().remove(invAtStamp.getTimestamp());
// To add a new save, would in theory just add back the save which we just removed
rPlayer.getRestores().put(stamp, new RInventory(stamp, pinv.getContents(), pinv.getArmorContents()));
// Check if a player has a empty inventory
System.out.println(InvRestoreAPI.hasEmptyInventory(p));
// There can be found a lot of other utils in "InvUtils", "ItemStackUtil", and "ColorRegex"
// Check them out!
}
}
}
}
Attached below are some screenshots:
FAQ:
- I paid, but can't download!? Don't worry! Due to PayPal's policy changes in my country, they have decided to unverify me. This means that I will have to manually approve payments you send to me. This will mostly take 10 minutes, if I'm online.
- Where are the pages? They are there now! Download the latest version.
- Can I get the source? I have opened a private repo at www.gitlab.com, where you will be added and can download the newest source, once you purchase the source which you will have to PM me about.
- I got errors! What shall I do? What a shame! Calm down, relax, and pull it straight-- you won't die. I am always happy to assist a consumer who has a good attitude. Errors can be quite common, and the source of the error can be a wide set of things. Including but not limited to: Java version being incompatible, spigot/Bukkit version being incompatible, an unexpected result occurred, etc. it's important that I know so I can expect it in the code, if you get what I mean. Don't post in the review section regarding your error, instead PM me or post respectfully in the Discussions thread created for this resource. Include a whole error, and which version of Java and Spigot you are running; from here you will have to communicate with me if I need any further information.
- I want feature! Can you please, please, please add it? Oooo, so you're the creative kind of type? We developers love those type of people, and are always happy to hear what kind of innovation you can bring to our products. Again, it's important that you do not use the reviews section, but rather PM me or use the discussion. I will make an evaluation of your idea, and decide whether I want to implement it or not, it's not up to you, even though I rarely turn down ideas which I know will bring glory to the plugin.
- No disclaimers.
By receiving this plugin you agree to not.
- Claim it as your own plugin
- You may edit the code for your own purposes (source needed!)
- Only use the plugin at ONE server/network
- Resell
- -Redacted- without the author's (@ExpDev) explicit and direct permission.
Thank you!