Skip to content

Commit

Permalink
logging fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Biplon committed Jul 23, 2020
1 parent fbcfcee commit 5d9e18f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion plugin.yml
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
12 changes: 6 additions & 6 deletions src/pts/java/player/PlayerManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
{
Expand Down Expand Up @@ -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();
}
Expand Down Expand Up @@ -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();
}
Expand Down Expand Up @@ -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();
}
Expand Down

0 comments on commit 5d9e18f

Please sign in to comment.