MIYamlFiles.saveYamlFile(groups, "groups.yml");
for(OfflinePlayer player1 : Bukkit.getServer().getOfflinePlayers()) {
plugin.getLogger().info("Importing player " + player1.getName() + "'s inventory from group " + mvgroup.getName());
HashMap<Integer, ItemStack[]> pinventory = mvinventories.loadPlayerInventory(player1.getName(), mvgroup, InventoryLoadType.INVENTORY);
HashMap<Integer, ItemStack[]> playerenderchest = mvinventories.loadPlayerInventory(player1.getName(), mvgroup, InventoryLoadType.ENDERCHEST);
PlayerStats playerstats = mvinventories.loadPlayerStats(player1.getName(), mvgroup);
if(pinventory != null) {
ItemStack[] inventory = pinventory.get(InventoryStoredType.INVENTORY);
ItemStack[] armor = pinventory.get(InventoryStoredType.ARMOUR);
double health = 20;
int hunger = 20;
float saturation = 5;
int totalexp = 0;
int level = 0;
float exp = 0;
if(playerstats != null) {
health = playerstats.getHealth();
hunger = playerstats.getFoodLevel();
saturation = playerstats.getSaturation();
level = playerstats.getLevel();
exp = playerstats.getExp();
totalexp = plugin.getTotalXP(level, exp);
}
if(MIYamlFiles.usesql) {
if(playerenderchest != null) {
ItemStack[] enderchestinventory = playerenderchest.get(InventoryStoredType.ARMOUR);