-
Notifications
You must be signed in to change notification settings - Fork 2
McsfStorageType API documentation
Joshua edited this page Jun 16, 2023
·
1 revision
The McsfStorageType
interface represents the interface for all MCSF storage types.
DatabaseConnector getDatabaseConnector()
- Returns the database connector.
void deleteUser(User user)
- Deletes a user from the User database.
Parameters:
-
user
: The user to be deleted.
String getName()
- Gets the name of this Storage type.
Returns:
- The string name.
void addOrUpdateUser(UUID uuid, String name, boolean status)
- Adds or updates a user in the database.
Parameters:
-
uuid
: The UUID of the user. -
name
: The name of the user. -
status
: The status of the user.
boolean getUserStatus(UUID uuid)
- Gets the status of a user.
Parameters:
-
uuid
: The UUID of the user.
Returns:
- The status of the user.
Set<User> getUserList()
- Gets the list of users.
Returns:
- The user list.
@Nullable User getUser(Object object)
- Gets a User from an Object.
Parameters:
-
object
: The object representing the user.
Returns:
- The User object. Returns null if the user does not exist.
void importData(Set<String> stringData, Set<User> userData, Set<String> whitelistData, Set<String> globalData, Set<String> regexList)
- Imports data from another database type.
Parameters:
-
stringData
: The set of blacklisted swears. -
userData
: The set of users. -
whitelistData
: The set of whitelist swears. -
globalData
: The set of global swears. -
regexList
: The set of custom regex patterns.
Set<String> getGlobalList()
- Gets the list of global swears.
Returns:
- The global swear list.
void addGlobal(String word)
- Adds a global swear to the global database.
Parameters:
-
word
: The word to add.
void removeGlobal(String word)
- Removes a global swear from the global database.
Parameters:
-
word
: The word to remove.
Set<String> getSwearList()
- Gets the list of blacklisted swears.
Returns:
- The swear list.
void addSwear(String word)
- Adds a swear to the blacklist database.
Parameters:
-
word
: The word to add.
void removeSwear(String word)
- Removes a swear from the blacklist database.
Parameters:
-
word
: The word to remove.
Set<String> getWhitelistList()
- Gets the list of whitelisted words.
Returns:
- The whitelist.
void addWhitelist(String word)
- Adds a word to the whitelist database.
Parameters:
-
word
: The word to add.
void removeWhitelist(String word)
- Removes a word from the whitelist database.
Parameters:
-
word
: The word to remove.
Set<String> getRegexList()
- Gets the list of custom regex patterns.
Returns:
- The regex pattern list.
void addRegex(Pattern pattern)
- Adds a custom regex pattern to the regex database.
Parameters:
-
pattern
: The regex pattern to add.
void remove
Regex(Pattern pattern)
- Removes a custom regex pattern from the regex database.
Parameters:
-
pattern
: The regex pattern to remove.
void reloadData()
- Reloads the database information.
This concludes the API documentation for the McsfStorageType
interface.