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 Detail

      • playerDirectory

        private final java.io.File playerDirectory
      • playerUUID

        private final java.lang.String playerUUID
    • Constructor Detail

      • LoadFromFile

        public LoadFromFile​(PlayerEntity 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:
      • getPlayerDirectory

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

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