public class DefaultPlayerDataSerializer extends Object implements PlayerDataSerializer
| Constructor and Description |
|---|
DefaultPlayerDataSerializer() |
| Modifier and Type | Method and Description |
|---|---|
Optional<InputStream> |
read(String name,
UUID uuid)
Reads player data from
InputStream if the file exists otherwise it will create the default data. |
OutputStream |
write(String name,
UUID uuid)
Writes player data to given
OutputStream. |
public Optional<InputStream> read(String name, UUID uuid) throws IOException
PlayerDataSerializerInputStream if the file exists otherwise it will create the default data.read in interface PlayerDataSerializername - name of player or UUID as Stringuuid - uuid of player. Could be null if name is used.InputStream if the player data existsIOExceptionpublic OutputStream write(String name, UUID uuid) throws IOException
PlayerDataSerializerOutputStream.write in interface PlayerDataSerializername - name of player or UUID as Stringuuid - uuid of player. Could be null if name is used.IOExceptionCopyright © 2020. All rights reserved.