diff --git a/plugin.yml b/plugin.yml index 5ac6ed5..2ca1493 100644 --- a/plugin.yml +++ b/plugin.yml @@ -1,7 +1,7 @@ name: PlayertoSql author: Vestri description: Plugin Player to Sql -version: 0.27 +version: 0.28 api-version: 1.15 main: pts.java.PlayertoSql depend: [ProtocolLib] diff --git a/src/pts/java/player/PlayerManager.java b/src/pts/java/player/PlayerManager.java index b734b66..7bbebf4 100644 --- a/src/pts/java/player/PlayerManager.java +++ b/src/pts/java/player/PlayerManager.java @@ -163,7 +163,7 @@ private void savePlayerFile(Player p, ItemStack[] inventory, ItemStack[] armor, } } - private void savePlayerFileLoad(Player p, ItemStack[] tmp, ItemStack[] tmp2) + private void savePlayerFileLoad(Player p, ItemStack[] tmp, ItemStack[] tmp2,String type) { UUID uuid = p.getUniqueId(); try @@ -176,7 +176,7 @@ private void savePlayerFileLoad(Player p, ItemStack[] tmp, ItemStack[] tmp2) } BufferedWriter bw = new BufferedWriter(new FileWriter(save_file, true)); Date time = new Date(); - bw.write("=[load]======[" + sdf.format(time) + "]======="); + bw.write("=[load "+ type +"]======[" + sdf.format(time) + "]======="); bw.newLine(); for (ItemStack item : tmp) { @@ -265,7 +265,7 @@ public void loadPlayer(Player p, boolean ignoreList) p.getInventory().setStorageContents(tmpinv); if (ConfigManager.playerFile) { - savePlayerFileLoad(p, tmpinv, null); + savePlayerFileLoad(p, tmpinv, null,"inventory"); } rs.close(); } @@ -308,7 +308,7 @@ public void loadPlayer(Player p, boolean ignoreList) p.getEnderChest().setContents(tmpend); if (ConfigManager.playerFile) { - savePlayerFileLoad(p, tmpend, null); + savePlayerFileLoad(p, tmpend, null,"enderchest"); } rs.close(); } @@ -344,11 +344,11 @@ public void loadPlayer(Player p, boolean ignoreList) ItemStack[] tmparmor = ItemManager.setItemStackData(values); p.getInventory().setArmorContents(tmparmor); - ItemStack[] tmpoff = ItemManager.setItemStackData(values); + ItemStack[] tmpoff = ItemManager.setItemStackData(values2); p.getInventory().setExtraContents(tmpoff); if (ConfigManager.playerFile) { - savePlayerFileLoad(p, tmparmor, tmpoff); + savePlayerFileLoad(p, tmparmor, tmpoff,"armor offhand"); } rs.close(); }