Examples of MIEnderchestInventory


Examples of uk.co.tggl.pluckerpluck.multiinv.inventory.MIEnderchestInventory

        return null;
    }
   
    public MIEnderchestInventory getEnderchestInventory(OfflinePlayer player, String group, String inventoryName) {
        // Get stored string from configuration file
        MIEnderchestInventory inventory = new MIEnderchestInventory();
        try {
            Statement st = con.createStatement();
            ResultSet rs = st.executeQuery("SELECT * FROM " + prefix + "enderchestinv WHERE inv_uuid='" + player.getUniqueId().toString() + "' AND inv_group='" + group + "'");
            if(rs.next()) {
                String inventoryString = rs.getString("chest_" + inventoryName.toLowerCase());
                inventory = new MIEnderchestInventory(inventoryString);
            }
        } catch(SQLException e) {
            // e.printStackTrace();
        }
        return inventory;
View Full Code Here

Examples of uk.co.tggl.pluckerpluck.multiinv.inventory.MIEnderchestInventory

    }
   
    // Load particular enderchest inventory for specified player from specified group
    public MIEnderchestInventory getEnderchestInventory(String inventoryName) {
        // Get stored string from configuration file
        MIEnderchestInventory inventory;
        String inventoryString = enderchestFile.getString(inventoryName, null);
       
        String folder = file.getParentFile().getName();
        MultiInv.log.debug("Loading " + playername + "'s " + inventoryName + " inventory from " + folder);
        inventory = new MIEnderchestInventory(inventoryString);
        return inventory;
    }
View Full Code Here

Examples of uk.co.tggl.pluckerpluck.multiinv.inventory.MIEnderchestInventory

        if(pcache == null) {
       
          pcache = loadGroup(group);
          cache.put(group, pcache);
        }
        MIEnderchestInventory inventory = pcache.getEnderchest(inventoryName);
        inventory.loadIntoInventory(enderchest);
    }
View Full Code Here

Examples of uk.co.tggl.pluckerpluck.multiinv.inventory.MIEnderchestInventory

        MIPlayerCache pcache = cache.get(group);
        if(pcache == null) {
          pcache = loadGroup(group);
          cache.put(group, pcache);
        }
        MIEnderchestInventory inventory = new MIEnderchestInventory(player);
        pcache.setEnderchest(inventory, inventoryName);
        if(MIYamlFiles.usesql) {
            MIYamlFiles.con.refreshConnection();
            MIYamlFiles.con.saveEnderchestInventory(player, group,
                    inventory, inventoryName);
View Full Code Here

Examples of uk.co.tggl.pluckerpluck.multiinv.inventory.MIEnderchestInventory

                                    totalexp = plugin.getTotalXP(level, exp);
                                }
                                if(MIYamlFiles.usesql) {
                                    if(playerenderchest != null) {
                                        ItemStack[] enderchestinventory = playerenderchest.get(InventoryStoredType.ARMOUR);
                                        MIYamlFiles.con.saveEnderchestInventory(player, group, new MIEnderchestInventory(enderchestinventory),
                                                "SURVIVAL");
                                    }
                                    MIYamlFiles.con.saveInventory(player, group, new MIInventory(inventory, armor, new LinkedList<PotionEffect>()),
                                            "SURVIVAL");
                                    MIYamlFiles.con.saveHealth(player, group, health);
                                    MIYamlFiles.con.saveHunger(player, group, hunger);
                                    MIYamlFiles.con.saveSaturation(player, group, saturation);
                                    MIYamlFiles.con.saveExperience(player, group, totalexp);
                                } else {
                                    MIPlayerFile config = new MIPlayerFile(player1, group);
                                    config.saveInventory(new MIInventory(inventory, armor, new LinkedList<PotionEffect>()), "SURVIVAL");
                                    if(playerenderchest != null) {
                                        ItemStack[] enderchestinventory = playerenderchest.get(InventoryStoredType.ARMOUR);
                                        config.saveEnderchestInventory(new MIEnderchestInventory(enderchestinventory), "SURVIVAL");
                                    }
                                    config.saveHealth(health);
                                    config.saveHunger(hunger);
                                    config.saveSaturation(saturation);
                                    config.saveExperience(totalexp, level, exp);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.