Class UserFolder

java.lang.Object
dev.selena.luacore.utils.data.UserFolder

public abstract class UserFolder extends Object
This class is required for any User folder class
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Data file class used for managing data internally
  • Constructor Summary

    Constructors
    Constructor
    Description
    Used for setting the UUID for various internal uses
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Used for setting up the class extending UserFolder
    <T> T
    loadData(@NotNull Class<T> clazz, @NotNull String fileName)
    Used for setting up the GSON mapping classes for user data

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • UserFolder

      public UserFolder(UUID uuid)
      Used for setting the UUID for various internal uses
      Parameters:
      uuid - The players UUID
  • Method Details

    • init

      public void init() throws NoUserJsonFoundException
      Used for setting up the class extending UserFolder
      Throws:
      NoUserJsonFoundException - when there is no Json files inside the user folder
    • loadData

      public <T> T loadData(@NotNull @NotNull Class<T> clazz, @NotNull @NotNull String fileName)
      Used for setting up the GSON mapping classes for user data
      Type Parameters:
      T - The class type
      Parameters:
      clazz - The class you want to map to
      fileName - The file name relative to the users data folder
      Returns:
      The mapped class