HomeJavaMods★ BasicBackpacks ★ The Best Working Backpacks Plugin [► CONSTANT UPDATES ◄]
★ BasicBackpacks ★ The Best Working Backpacks Plugin [► CONSTANT UPDATES ◄]
ModsJava

★ BasicBackpacks ★ The Best Working Backpacks Plugin [► CONSTANT UPDATES ◄]

⬇ Download on Spigot
[​IMG]
BasicBackpacks is a free and simple to use PlayerVaults like plugin. This plugin is currently in BETA but will have constant updates. This plugin is made 100% by me FrostedWeFall as well as some help from other people. I try my hardest to update this plugin constantly however I have school and I will be doing tests very soon so development may slow down ( or in some cases come to a halt ).


[​IMG]
Some features include....
[​IMG]
Here are all the commands for the plugin, the have no permissions as none are needed.

/bbhelp - Shows the help menu
/backpack - Opens your personal backpack
/bbp - Shows info about the plugin and the Github Page.

[​IMG]

pvp.factionsx.eu :D

Leave your server IP in the review and ill add it if you're using this plugin.

Installation:

The installation is literally just drag and drop, so if you are used to installing plugins, you shouldn't have to read this next part.
Locate your "plugins" folder which is located in your servers home folder.
Drop the downloaded Backpacks.jar into the plugins folder.
Run the server once to complete the installation!
NOTE: Backpacks will create some files. Do NOT delete or modify these files unless you know what you are doing. You could mess up someones backpack.


More:

If you enjoy this you will enjoy my other Skripts and Plugins below!
https://www.spigotmc.org/resources/playervaults-duplication-protect.45711/
https://www.spigotmc.org/resources/frostclearlag.46239/
https://www.spigotmc.org/resources/1-12-1-12-1-frostchat-skript.44229/



This plugin uses bStats which tracks data from your server, this can be disabled in the bStats config if you wish to.

https://forums.spongepowered.org/t/bstats-a-modern-alternative-to-mcstats/16065


For those that want the code but do not want to go to Github here is the code, if you use this in your plugin please credit me!

Code (Text):
package BasicBackpacks;

import java.util.HashMap;
import java.util.Map.Entry;
import java.util.UUID;
 
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.inventory.InventoryType;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.java.JavaPlugin;

import BasicBackpacks.BasicBackpacks;

public class BasicBackpacks extends JavaPlugin implements Listener {
     
        private HashMap<UUID, Inventory> BasicBackpacks = new HashMap<UUID, Inventory>();
     
        @EventHandler
        public void onPlayerJoin(PlayerJoinEvent e) {
                Inventory inv = Bukkit.getServer().createInventory(e.getPlayer(), InventoryType.CHEST, "Your Backpack");
             
                if (getConfig().contains("BasicBackpacks." + e.getPlayer().getUniqueId())) {
                        for (String item : getConfig().getConfigurationSection("BasicBackpacks." + e.getPlayer().getUniqueId()).getKeys(false)) {
                                inv.addItem(loadItem(getConfig().getConfigurationSection("BasicBackpacks." + e.getPlayer().getUniqueId() + "." + item)));
                        }
                }
             
                BasicBackpacks.put(e.getPlayer().getUniqueId(), inv);
        }
     
        @EventHandler
        public void onPlayerLeave(PlayerQuitEvent e) {
                if (!getConfig().contains("BasicBackpacks." + e.getPlayer().getUniqueId())) {
                        getConfig().createSection("backpacks." + e.getPlayer().getUniqueId());
                }
             
                char c = 'a';
                for (ItemStack itemStack : BasicBackpacks.get(e.getPlayer().getUniqueId())) {
                        if (itemStack != null) {
                                saveItem(getConfig().createSection("BasicBackpacks." + e.getPlayer().getUniqueId() + "." + c++), itemStack);
                        }
                }
             
                saveConfig();
        }
     
        public void onEnable() {
                Bukkit.getServer().getPluginManager().registerEvents(this, this);
                Metrics metrics = new Metrics(this);
                getServer().getConsoleSender().sendMessage(ChatColor.GREEN + "\n\nBasicBackpacks V0.6.0 Has been succesfully enabled!\n\n");
        }

     
        public void onDisable() {
            getServer().getConsoleSender().sendMessage(ChatColor.RED + "\n\nBasicBackpacks V0.6.0 Has been succesfully disabled!\n\n");
                for (Entry<UUID, Inventory> entry : BasicBackpacks.entrySet()) {
                        if (!getConfig().contains("BasicBackpacks." + entry.getKey())) {
                                getConfig().createSection("BasicBackpacks." + entry.getKey());
                        }
                     
                        char c = 'a';
                        for (ItemStack itemStack : entry.getValue()) {
                                if (itemStack != null) {
                                        saveItem(getConfig().createSection("BasicBackpacks." + entry.getKey() + "." + c++), itemStack);
                                }
                        }
                     
                        saveConfig();
                }
        }
     
        @Override
        public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) {
                if (!(sender instanceof Player)) {
                        sender.sendMessage(ChatColor.RED + "The console cannot have an backpack, you must be a player to activate this command");
                        return true;
                }
             
                Player p = (Player) sender;
             
                if (cmd.getName().equalsIgnoreCase("backpack")) {
                        p.openInventory(BasicBackpacks.get(p.getUniqueId()));
                        p.sendMessage(ChatColor.GRAY + "Opening your personal backpack!");
                }
                if (cmd.getName().equalsIgnoreCase("backpack")) {
                        p.openInventory(BasicBackpacks.get(p.getUniqueId()));
                        p.sendMessage(ChatColor.GRAY + "Opening your personal backpack!");
                }
                if (cmd.getName().equalsIgnoreCase("bbp")) {
                        p.sendMessage(ChatColor.GRAY + "BasicBackpacksBETA Created By FrostedWeFall");
                        p.sendMessage(ChatColor.GRAY + "Please report any issues at https://github.com/TheRealFrostedWeFall/BasicBackpacks/issues");
                }
                if (cmd.getName().equalsIgnoreCase("bbhelp")) {
                        p.sendMessage(ChatColor.GRAY + "-----+--------------------+-----");
                        p.sendMessage(ChatColor.AQUA + "BasicBackpacks V0.6.0 BETA By FrostedWeFall");
                        p.sendMessage(ChatColor.GRAY + "/backpack -" + ChatColor.AQUA + " Opens your personal backpack!");
                        p.sendMessage(ChatColor.GRAY + "/bbp -" + ChatColor.AQUA + " Info menu about the BasicBackpacks plugin!");
                        p.sendMessage(ChatColor.GRAY + "/bp -" + ChatColor.AQUA + " Also opens your personal backpack!");
                        p.sendMessage(ChatColor.GRAY + "-----+--------------------+-----");
                }
                return true;
                   
        }
     
        private void saveItem(ConfigurationSection section, ItemStack itemStack) {
                section.set("type", itemStack.getType().name());
                section.set("amount", itemStack.getAmount());
                // Save more information.
        }
     
        private ItemStack loadItem(ConfigurationSection section) {
                return new ItemStack(Material.valueOf(section.getString("type")), section.getInt("amount"));
                // Load more information.
        }
}
       
 

Download Goals


10 Downloads :)
20 Downloads :)
50 Downloads :)
100 Downloads :)
125 Downloads :(
150 Downloads :(
175 Downloads :(
201 Downloads :(


[​IMG] [​IMG]
Here is come useful information about the plugin.

This plugin has only been tested on 1.8.8 and 1.12.x servers however it should work on all versions from 1.8 - 1.12!

The only known bug as of 16:59 20/12/2017 is that on opening of a players backpack it displays the "Opening your backpack" message twice however this will be fixed within a later update.

This plugin has not been tested on PaperSpigot and therefore I am not sure whether this plugin will work. If it does break and you are using a PaperSpigot version do not expect any help as it is not my responsibility and I have warned you.

Please do not tell me there is an error in the reviews section, you will not receive any help or a reply to your message. Bug fixes and Plugin help belong in the discussion tab!

This plugin does not depend or conflict with any other plugins that I am aware of, If one does, please pm me on discord @ FrostedWeFall#8609

There are no current permissions for the plugin as of the 0.6.0 Update!

Leave suggestions in discussion or in the reviews!

Thanks for reading, be sure to leave a 5 star review if you think this plugin is good and have a good day <3

Commands

Plugin details

Read from the plugin's own plugin.yml.

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

★ BasicBackpacks ★ The Best Working Backpacks Plugin [► CONSTANT UPDATES ◄] is a free Minecraft Java mod. Compatible with Minecraft 1.8, 1.12. Downloaded 606 times (via Spigot). Download it and open it directly in the game.

Explore more