Package net.dzikoysk.funnyguilds.user
Class UserUtils
java.lang.Object
net.dzikoysk.funnyguilds.user.UserUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic panda.std.Option<File>checkUserFile(PluginConfiguration config, File file) Check if user file is correct and if not - try migrating itstatic UserDeprecated.static UserDeprecated.for removal in the future, in favour ofUserManager.findByName(String, boolean)static UserDeprecated.for removal in the future, in favour ofUserManager.findByUuid(UUID)getOnlineNames(Collection<User> users) Gets the set of usernames (with tags to format) from collection of users.static StringgetUserPosition(PluginConfiguration pluginConfiguration, User user) getUsers()Deprecated.for removal in the future, in favour ofUserManager.getUsers()getUsersFromString(Collection<String> names) Deprecated.for removal in the future, in favour ofUserManager.findByNames(Collection)migrateUserFile(File file) Try migrating a user file to a new name
-
Method Details
-
getUsers
Deprecated.for removal in the future, in favour ofUserManager.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 ofUserManager.findByNames(Collection)Gets the set of users from collection of strings (names).- Parameters:
names- collection of names- Returns:
- set of users
-
get
Deprecated.for removal in the future, in favour ofUserManager.findByUuid(UUID)Gets the user.- Parameters:
uuid- the universally unique identifier of user- Returns:
- the user
-
get
Deprecated.for removal in the future, in favour ofUserManager.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 ofUserManager.findByName(String, boolean)Gets the user.- Parameters:
nickname- the name of userignoreCase- ignore the case of the nickname- Returns:
- the user
-
getOnlineNames
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
-
checkUserFile
Check if user file is correct and if not - try migrating it- Parameters:
config- plugin configurationfile- user file- Returns:
- A final (source or migrated) user file
-
migrateUserFile
Try migrating a user file to a new name- Parameters:
file- user file- Returns:
- Result with migrated user file or a migration error message
-
UserManager.findByName(String)