Advertisement
Guest User

Untitled

a guest
Jun 17th, 2021
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. fun setPlayerInfo() {
  2. val playerDataFile = File(dataFolder.toString() + "/PlayerData/", "PlayerData.yml")
  3.  
  4. try {
  5. playerDataFile.createNewFile()
  6. } catch (e: IOException) {
  7. e.printStackTrace()
  8. }
  9.  
  10. val config: YamlConfiguration = YamlConfiguration.loadConfiguration(playerDataFile)
  11. config.set("PlayerName", 0)
  12.  
  13. try {
  14. config.save(playerDataFile)
  15. } catch (e: IOException) {
  16. e.printStackTrace()
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement