public void writeData(GlowPlayer player) {
File playerFile = getPlayerFile(player.getUniqueId());
CompoundTag tag = new CompoundTag();
EntityStorage.save(player, tag);
try (NBTOutputStream out = new NBTOutputStream(new FileOutputStream(playerFile))) {
out.writeTag(tag);
} catch (IOException e) {
player.kickPlayer("Failed to save player data!");
server.getLogger().log(Level.SEVERE, "Failed to write data for " + player.getName() + ": " + playerFile, e);
}
}