Class GroupColorSettingsProvider

java.lang.Object
de.murmelmeister.murmelapi.group.settings.GroupColorSettingsProvider
All Implemented Interfaces:
GroupColorSettings

public final class GroupColorSettingsProvider extends Object implements GroupColorSettings
  • Constructor Details

    • GroupColorSettingsProvider

      public GroupColorSettingsProvider()
  • Method Details

    • createTable

      private void createTable(String tableName)
    • existsGroup

      public boolean existsGroup(int groupId)
      Description copied from interface: GroupColorSettings
      Checks if a group exists.
      Specified by:
      existsGroup in interface GroupColorSettings
      Parameters:
      groupId - The id of the group.
      Returns:
      True if the group exists, otherwise false.
    • createGroup

      public void createGroup(int groupId, int creatorId)
      Description copied from interface: GroupColorSettings
      Creates a new group and checks if the group already exists. If the group already exists, the method will return without creating a new group.
      Specified by:
      createGroup in interface GroupColorSettings
      Parameters:
      groupId - The id of the group.
      creatorId - The creator id of the group.
    • createGroup

      public void createGroup(int groupId, int creatorId, String chatPrefix, String chatSuffix, String chatColor, String tabPrefix, String tabSuffix, String tabColor, String tagPrefix, String tagSuffix, String tagColor)
      Description copied from interface: GroupColorSettings
      Creates a new group and checks if the group already exists. If the group already exists, the method will return without creating a new group.
      Specified by:
      createGroup in interface GroupColorSettings
      Parameters:
      groupId - The id of the group.
      creatorId - The creator id of the group.
      chatPrefix - The chat prefix of the group.
      chatSuffix - The chat suffix of the group.
      chatColor - The chat color of the group.
      tabPrefix - The tab prefix of the group.
      tabSuffix - The tab suffix of the group.
      tabColor - The tab color of the group.
      tagPrefix - The tag prefix of the group.
      tagSuffix - The tag suffix of the group.
      tagColor - The tag color of the group.
    • deleteGroup

      public void deleteGroup(int groupId)
      Description copied from interface: GroupColorSettings
      Deletes a group.
      Specified by:
      deleteGroup in interface GroupColorSettings
      Parameters:
      groupId - The id of the group.
    • getCreatorId

      public int getCreatorId(int groupId)
      Description copied from interface: GroupColorSettings
      Obtains the creator id of a group.
      Specified by:
      getCreatorId in interface GroupColorSettings
      Parameters:
      groupId - The id of the group.
      Returns:
      The creator id of the group.
    • getEditedTime

      public long getEditedTime(int groupId)
      Description copied from interface: GroupColorSettings
      Obtains the edited time of a group.
      Specified by:
      getEditedTime in interface GroupColorSettings
      Parameters:
      groupId - The id of the group.
      Returns:
      The edited time of the group.
    • getEditedDate

      public String getEditedDate(int groupId)
      Description copied from interface: GroupColorSettings
      Obtains the edited date of a group.
      Specified by:
      getEditedDate in interface GroupColorSettings
      Parameters:
      groupId - The id of the group.
      Returns:
      The edited date of the group.
    • getPrefix

      public String getPrefix(GroupColorType type, int groupId)
      Description copied from interface: GroupColorSettings
      Obtains the prefix of a group.
      Specified by:
      getPrefix in interface GroupColorSettings
      Parameters:
      type - The type of the group color.
      groupId - The id of the group.
      Returns:
      The prefix of the group.
    • getSuffix

      public String getSuffix(GroupColorType type, int groupId)
      Description copied from interface: GroupColorSettings
      Obtains the suffix of a group.
      Specified by:
      getSuffix in interface GroupColorSettings
      Parameters:
      type - The type of the group color.
      groupId - The id of the group.
      Returns:
      The suffix of the group.
    • getColor

      public String getColor(GroupColorType type, int groupId)
      Description copied from interface: GroupColorSettings
      Obtains the color of a group.
      Specified by:
      getColor in interface GroupColorSettings
      Parameters:
      type - The type of the group color.
      groupId - The id of the group.
      Returns:
      The color of the group.
    • setPrefix

      public void setPrefix(GroupColorType type, int groupId, int creatorId, String prefix)
      Description copied from interface: GroupColorSettings
      Sets the prefix of a group.
      Specified by:
      setPrefix in interface GroupColorSettings
      Parameters:
      type - The type of the group color.
      groupId - The id of the group.
      creatorId - The creator id of the group.
      prefix - The prefix of the group.
    • setSuffix

      public void setSuffix(GroupColorType type, int groupId, int creatorId, String suffix)
      Description copied from interface: GroupColorSettings
      Sets the suffix of a group.
      Specified by:
      setSuffix in interface GroupColorSettings
      Parameters:
      type - The type of the group color.
      groupId - The id of the group.
      creatorId - The creator id of the group.
      suffix - The suffix of the group.
    • setColor

      public void setColor(GroupColorType type, int groupId, int creatorId, String color)
      Description copied from interface: GroupColorSettings
      Sets the color of a group.
      Specified by:
      setColor in interface GroupColorSettings
      Parameters:
      type - The type of the group color.
      groupId - The id of the group.
      creatorId - The creator id of the group.
      color - The color of the group.