Class PlayerEvent.LoadFromFile

Enclosing class:
PlayerEvent

public static class PlayerEvent.LoadFromFile extends PlayerEvent
The player is being loaded from the world save. Note that the player won't have been added to the world yet. Intended to allow mods to load an additional file from the players directory containing additional mod related player data.
  • Field Details Link icon

    • playerDirectory Link icon

      private final File playerDirectory
    • playerUUID Link icon

      private final String playerUUID
  • Constructor Details Link icon

    • LoadFromFile Link icon

      public LoadFromFile(Player player, File originDirectory, String playerUUID)
  • Method Details Link icon

    • getPlayerFile Link icon

      public File getPlayerFile(String suffix)
      Construct and return a recommended file for the supplied suffix
      Parameters:
      suffix - The suffix to use.
    • getPlayerDirectory Link icon

      public File getPlayerDirectory()
      The directory where player data is being stored. Use this to locate your mod additional file.
    • getPlayerUUID Link icon

      public String getPlayerUUID()
      The UUID is the standard for player related file storage. It is broken out here for convenience for quick file generation.