Class GroupColorProvider
java.lang.Object
de.murmelmeister.murmelapi.group.color.GroupColorProvider
- All Implemented Interfaces:
GroupColor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateGroup(int executorId, int groupId) Creates a new group entry in the database with the provided user and group IDs.voidcreateGroup(int executorId, int groupId, String chatPrefix, String chatSuffix, String chatColor, String tabPrefix, String tabSuffix, String tabColor, String teamPrefix, String teamSuffix, String teamColor) Creates a new group with detailed customization options for chat, tab, and team settings.voiddeleteGroup(int groupId) Deletes the group with the specified group ID from the database.booleanexistsGroup(int groupId) Checks if a group with the specified group ID exists in the database.getColor(int groupId, GroupColorType type) Retrieves the color associated with the specified group and group color type.getCreatedAt(int groupId) Retrieves the creation timestamp of the group with the specified group ID.intgetCreatedBy(int groupId) Retrieves the ID of the user who created the specified group.getModifiedAt(int groupId) Retrieves the timestamp at which the specified group was last modified.intgetModifiedBy(int groupId) Retrieves the ID of the user who last modified the group with the specified group ID.getPrefix(int groupId, GroupColorType type) Retrieves the prefix associated with the specified group and group color type.getSuffix(int groupId, GroupColorType type) Retrieves the suffix associated with the specified group and group color type.voidsetColor(int executorId, int groupId, GroupColorType type, String color) Sets the color associated with the specified group and group color type.voidsetPrefix(int executorId, int groupId, GroupColorType type, String prefix) Sets the prefix associated with the specified group and group color type.voidsetSuffix(int executorId, int groupId, GroupColorType type, String suffix) Sets the suffix associated with the specified group and group color type.static void
-
Constructor Details
-
GroupColorProvider
-
-
Method Details
-
setup
-
existsGroup
public boolean existsGroup(int groupId) Description copied from interface:GroupColorChecks if a group with the specified group ID exists in the database.- Specified by:
existsGroupin interfaceGroupColor- Parameters:
groupId- The unique identifier of the group to be checked- Returns:
- True if the group exists, false otherwise
-
createGroup
public void createGroup(int executorId, int groupId) Description copied from interface:GroupColorCreates a new group entry in the database with the provided user and group IDs. If the group already exists, the method returns without taking any action.- Specified by:
createGroupin interfaceGroupColor- Parameters:
executorId- The unique identifier of the user initiating the group creationgroupId- The unique identifier of the group to be created
-
createGroup
public void createGroup(int executorId, int groupId, String chatPrefix, String chatSuffix, String chatColor, String tabPrefix, String tabSuffix, String tabColor, String teamPrefix, String teamSuffix, String teamColor) Description copied from interface:GroupColorCreates a new group with detailed customization options for chat, tab, and team settings. If the group with the specified groupId already exists, no action is taken.- Specified by:
createGroupin interfaceGroupColor- Parameters:
executorId- The unique identifier of the user initiating the group creation.groupId- The unique identifier of the group to be created.chatPrefix- The prefix to be used for chat messages.chatSuffix- The suffix to be used for chat messages.chatColor- The color code to be applied to chat messages.tabPrefix- The prefix to be displayed in the tab list.tabSuffix- The suffix to be displayed in the tab list.tabColor- The color code to be applied to the tab list.teamPrefix- The prefix to be used for team names.teamSuffix- The suffix to be used for team names.teamColor- The color code to be applied to team names.
-
deleteGroup
public void deleteGroup(int groupId) Description copied from interface:GroupColorDeletes the group with the specified group ID from the database. This operation is performed by the user with the given user ID.- Specified by:
deleteGroupin interfaceGroupColor- Parameters:
groupId- The unique identifier of the group to be deleted.
-
getPrefix
Description copied from interface:GroupColorRetrieves the prefix associated with the specified group and group color type.- Specified by:
getPrefixin interfaceGroupColor- Parameters:
groupId- The unique identifier of the group.type- The type of group color customization (e.g., Chat, Tab, or Team).- Returns:
- The prefix string associated with the specified group and type.
-
getSuffix
Description copied from interface:GroupColorRetrieves the suffix associated with the specified group and group color type.- Specified by:
getSuffixin interfaceGroupColor- Parameters:
groupId- The unique identifier of the group.type- The type of group color customization (e.g., Chat, Tab, or Team).- Returns:
- The suffix string associated with the specified group and type.
-
getColor
Description copied from interface:GroupColorRetrieves the color associated with the specified group and group color type.- Specified by:
getColorin interfaceGroupColor- Parameters:
groupId- The unique identifier of the group.type- The type of group color customization (e.g., Chat, Tab, or Team).- Returns:
- The color string associated with the specified group and type.
-
setPrefix
Description copied from interface:GroupColorSets the prefix associated with the specified group and group color type.- Specified by:
setPrefixin interfaceGroupColor- Parameters:
executorId- The unique identifier of the user initiating the operation.groupId- The unique identifier of the group whose prefix is being set.type- The type of group color customization (e.g., Chat, Tab, or Team).prefix- The prefix string to be set for the specified group and type.
-
setSuffix
Description copied from interface:GroupColorSets the suffix associated with the specified group and group color type.- Specified by:
setSuffixin interfaceGroupColor- Parameters:
executorId- The unique identifier of the user initiating the operation.groupId- The unique identifier of the group whose suffix is being set.type- The type of group color customization (e.g., Chat, Tab, or Team).suffix- The suffix string to be set for the specified group and type.
-
setColor
Description copied from interface:GroupColorSets the color associated with the specified group and group color type.- Specified by:
setColorin interfaceGroupColor- Parameters:
executorId- The unique identifier of the user initiating the operation.groupId- The unique identifier of the group whose color is being set.type- The type of group color customization (e.g., Chat, Tab, or Team).color- The color string to be set for the specified group and type.
-
getCreatedBy
public int getCreatedBy(int groupId) Description copied from interface:GroupColorRetrieves the ID of the user who created the specified group.- Specified by:
getCreatedByin interfaceGroupColor- Parameters:
groupId- The unique identifier of the group whose creator ID is to be retrieved.- Returns:
- The unique identifier of the user who created the group.
-
getCreatedAt
Description copied from interface:GroupColorRetrieves the creation timestamp of the group with the specified group ID.- Specified by:
getCreatedAtin interfaceGroupColor- Parameters:
groupId- The unique identifier of the group whose creation timestamp is to be retrieved.- Returns:
- The creation timestamp of the specified group, or null if the group does not exist.
-
getModifiedBy
public int getModifiedBy(int groupId) Description copied from interface:GroupColorRetrieves the ID of the user who last modified the group with the specified group ID.- Specified by:
getModifiedByin interfaceGroupColor- Parameters:
groupId- The unique identifier of the group whose last modifier is to be retrieved.- Returns:
- The unique identifier of the user who last modified the group.
-
getModifiedAt
Description copied from interface:GroupColorRetrieves the timestamp at which the specified group was last modified.- Specified by:
getModifiedAtin interfaceGroupColor- Parameters:
groupId- The unique identifier of the group whose modification timestamp is to be retrieved.- Returns:
- A
Timestampobject representing the last modification time of the specified group.
-