Class UserUtils

java.lang.Object
net.dzikoysk.funnyguilds.user.UserUtils

public final class UserUtils extends Object
  • Method Details

    • getUsers

      @Deprecated @ScheduledForRemoval(inVersion="5.0") public static Set<User> getUsers()
      Deprecated.
      for removal in the future, in favour of UserManager.getUsers()
      Gets the copied set of users.
      Returns:
      set of users
    • getUsersFromString

      @Deprecated @ScheduledForRemoval(inVersion="5.0") public static Set<User> getUsersFromString(Collection<String> names)
      Deprecated.
      for removal in the future, in favour of UserManager.findByNames(Collection)
      Gets the set of users from collection of strings (names).
      Parameters:
      names - collection of names
      Returns:
      set of users
    • get

      @Nullable @Deprecated @ScheduledForRemoval(inVersion="5.0") public static User get(UUID uuid)
      Deprecated.
      for removal in the future, in favour of UserManager.findByUuid(UUID)
      Gets the user.
      Parameters:
      uuid - the universally unique identifier of user
      Returns:
      the user
    • get

      @Nullable @Deprecated @ScheduledForRemoval(inVersion="5.0") public static User get(String nickname)
      Deprecated.
      for removal in the future, in favour of UserManager.findByName(String)
      Gets the user.
      Parameters:
      nickname - the name of user
      Returns:
      the user
    • get

      @Nullable @Deprecated @ScheduledForRemoval(inVersion="5.0") public static User get(String nickname, boolean ignoreCase)
      Deprecated.
      for removal in the future, in favour of UserManager.findByName(String, boolean)
      Gets the user.
      Parameters:
      nickname - the name of user
      ignoreCase - ignore the case of the nickname
      Returns:
      the user
    • getOnlineNames

      public static Set<String> getOnlineNames(Collection<User> users)
      Gets the set of usernames (with tags to format) from collection of users.
      Parameters:
      users - collection of users
      Returns:
      set of usernames (with tags to format)
    • getUserPosition

      public static String getUserPosition(PluginConfiguration pluginConfiguration, @Nullable User user)
    • checkUserFile

      public static panda.std.Option<File> checkUserFile(PluginConfiguration config, File file)
      Check if user file is correct and if not - try migrating it
      Parameters:
      config - plugin configuration
      file - user file
      Returns:
      A final (source or migrated) user file
    • migrateUserFile

      public static panda.std.Result<File,String> migrateUserFile(File file)
      Try migrating a user file to a new name
      Parameters:
      file - user file
      Returns:
      Result with migrated user file or a migration error message