Class GuildUtils

java.lang.Object
net.dzikoysk.funnyguilds.guild.GuildUtils

public final class GuildUtils extends Object
  • Method Details

    • countGuilds

      @Deprecated @ScheduledForRemoval(inVersion="5.0") public static int countGuilds()
      Deprecated.
    • getGuilds

      @Deprecated @ScheduledForRemoval(inVersion="5.0") public static Set<Guild> getGuilds()
      Deprecated.
      for removal in the future, in favour of GuildManager.getGuilds()
      Gets the copied set of guilds.
      Returns:
      set of guild
    • getGuilds

      @Deprecated @ScheduledForRemoval(inVersion="5.0") public static Set<Guild> getGuilds(Collection<String> names)
      Deprecated.
      for removal in the future, in favour of GuildManager.findByNames(Collection)
      Gets the set of guilds from collection of strings (names).
      Parameters:
      names - collection of names
      Returns:
      set of guild
    • getByUUID

      @Nullable @Deprecated @ScheduledForRemoval(inVersion="5.0") public static Guild getByUUID(UUID uuid)
      Deprecated.
      for removal in the future, in favour of GuildManager.findByUuid(UUID)
      Gets the guild.
      Parameters:
      uuid - the uuid of guild
      Returns:
      the guild
    • getByName

      @Nullable @Deprecated @ScheduledForRemoval(inVersion="5.0") public static Guild getByName(String name)
      Deprecated.
      for removal in the future, in favour of GuildManager.findByName(String)
      Gets the guild.
      Parameters:
      name - the name of guild
      Returns:
      the guild
    • getByTag

      @Nullable @Deprecated @ScheduledForRemoval(inVersion="5.0") public static Guild getByTag(String tag)
      Deprecated.
      for removal in the future, in favour of GuildManager.findByTag(String)
      Gets the guild.
      Parameters:
      tag - the tag of guild
      Returns:
      the guild
    • nameExists

      @Deprecated @ScheduledForRemoval(inVersion="5.0") public static boolean nameExists(String name)
      Deprecated.
      for removal in the future, in favour of GuildManager.nameExists(String)
      Check if guild name is taken.
      Parameters:
      name - the name to check
      Returns:
      the result
    • tagExists

      @Deprecated @ScheduledForRemoval(inVersion="5.0") public static boolean tagExists(String tag)
      Deprecated.
      for removal in the future, in favour of GuildManager.nameExists(String)
      Check if guild tag is taken.
      Parameters:
      tag - the tag to check
      Returns:
      the result
    • addGuild

      @Deprecated @ScheduledForRemoval(inVersion="5.0") public static void addGuild(Guild guild)
      Deprecated.
      for removal in the future, in favour of GuildManager.addGuild(Guild)
      Add guild to storage. If you think you should use this method you probably shouldn't.
      Parameters:
      guild - guild to add
    • removeGuild

      @Deprecated @ScheduledForRemoval(inVersion="5.0") public static void removeGuild(Guild guild)
      Deprecated.
      for removal in the future, in favour of GuildManager.removeGuild(Guild)
      Remove guild from storage. If you think you should use this method you probably shouldn't - instead use GuildManager.deleteGuild(FunnyGuilds, Guild).
      Parameters:
      guild - guild to remove
    • deleteGuild

      @Deprecated @ScheduledForRemoval(inVersion="5.0") public static void deleteGuild(Guild guild)
      Deprecated.
      for removal in the future, in favour of GuildManager.deleteGuild(FunnyGuilds, Guild)
      Delete guild in every possible way.
      Parameters:
      guild - guild to delete
    • getTags

      public static Set<String> getTags(Collection<Guild> guilds)
      Gets the set of guild tags from collection of guild.
      Parameters:
      guilds - collection of users
      Returns:
      set of guild tags
    • validateName

      public static boolean validateName(PluginConfiguration pluginConfiguration, String guildName)
      Validate guild name.
      Parameters:
      pluginConfiguration - the PluginConfiguration from which pattern will be used
      guildName - guild name to validate
      Returns:
      if guild name is valid
    • validateTag

      public static boolean validateTag(PluginConfiguration pluginConfiguration, String guildTag)
      Validate guild tag.
      Parameters:
      pluginConfiguration - the PluginConfiguration from which pattern will be used
      guildTag - guild tag to validate
      Returns:
      if guild tag is valid