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

    • playerDirectory

      private final File playerDirectory
    • playerUUID

      private final String playerUUID
  • Constructor Details

    • LoadFromFile

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

    • getPlayerFile

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

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

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