net.minecraftforge.event.entity.player

## Class PlayerEvent.SaveToFile

- java.lang.Object
- - cpw.mods.fml.common.eventhandler.Event
  - - net.minecraftforge.event.entity.EntityEvent
    - - net.minecraftforge.event.entity.living.LivingEvent
      - - net.minecraftforge.event.entity.player.PlayerEvent
        - - net.minecraftforge.event.entity.player.PlayerEvent.SaveToFile

- Enclosing class:
    PlayerEvent

      public static class PlayerEvent.SaveToFile
      extends PlayerEvent

  The player is being saved to the world store. Note that the player may be in the process of logging out or otherwise departing from the world. Don't assume it's association with the world. This allows mods to load an additional file from the players directory containing additional mod related player data.
  Use this event to save the additional mod related player data to the world.
  WARNING: Do not overwrite the player's .dat file here. You will corrupt the world state.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class net.minecraftforge.event.entity.player.PlayerEvent

      `PlayerEvent.BreakSpeed, PlayerEvent.Clone, PlayerEvent.HarvestCheck, PlayerEvent.LoadFromFile, PlayerEvent.NameFormat, PlayerEvent.SaveToFile, PlayerEvent.StartTracking, PlayerEvent.StopTracking`

    - ### Nested classes/interfaces inherited from class net.minecraftforge.event.entity.living.LivingEvent

      `LivingEvent.LivingJumpEvent, LivingEvent.LivingUpdateEvent`

    - ### Nested classes/interfaces inherited from class net.minecraftforge.event.entity.EntityEvent

      `EntityEvent.CanUpdate, EntityEvent.EnteringChunk, EntityEvent.EntityConstructing`

    - ### Nested classes/interfaces inherited from class cpw.mods.fml.common.eventhandler.Event

      `Event.HasResult, Event.Result`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `java.io.File` | `playerDirectory` The directory where player data is being stored.
    `java.lang.String` | `playerUUID` The UUID is the standard for player related file storage.

    - ### Fields inherited from class net.minecraftforge.event.entity.player.PlayerEvent

      `entityPlayer`

    - ### Fields inherited from class net.minecraftforge.event.entity.living.LivingEvent

      `entityLiving`

    - ### Fields inherited from class net.minecraftforge.event.entity.EntityEvent

      `entity`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PlayerEvent.SaveToFile(EntityPlayer player, java.io.File originDirectory, java.lang.String playerUUID)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.io.File` | `getPlayerFile(java.lang.String suffix)` Construct and return a recommended file for the supplied suffix

    - ### Methods inherited from class cpw.mods.fml.common.eventhandler.Event

      `getListenerList, getResult, hasResult, isCancelable, isCanceled, setCanceled, setResult, setup`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### playerDirectory

          public final java.io.File playerDirectory

      The directory where player data is being stored. Use this to locate your mod additional file.

    - #### playerUUID

          public final java.lang.String playerUUID

      The UUID is the standard for player related file storage. It is broken out here for convenience for quick file generation.

  - ### Constructor Detail

    - #### PlayerEvent.SaveToFile

          public PlayerEvent.SaveToFile(EntityPlayer player,
                                java.io.File originDirectory,
                                java.lang.String playerUUID)

  - ### Method Detail

    - #### getPlayerFile

          public java.io.File getPlayerFile(java.lang.String suffix)

      Construct and return a recommended file for the supplied suffix
      Parameters:
        `suffix` - The suffix to use.
      Returns: