Package cn.nukkit.utils
Interface PlayerDataSerializer
- All Known Implementing Classes:
DefaultPlayerDataSerializer
public interface PlayerDataSerializer
-
Method Summary
Modifier and TypeMethodDescriptionReads player data fromInputStream
if the file exists otherwise it will create the default data.Writes player data to givenOutputStream
.
-
Method Details
-
read
Reads player data fromInputStream
if the file exists otherwise it will create the default data.- Parameters:
name
- name of player orUUID
asString
uuid
- uuid of player. Could be null if name is used.- Returns:
InputStream
if the player data exists- Throws:
IOException
-
write
Writes player data to givenOutputStream
.- Parameters:
name
- name of player orUUID
asString
uuid
- uuid of player. Could be null if name is used.- Returns:
- stream to write player data
- Throws:
IOException
-