Package net.dzikoysk.funnyguilds.guild
Class GuildUtils
java.lang.Object
net.dzikoysk.funnyguilds.guild.GuildUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidDeprecated.static intDeprecated.static voiddeleteGuild(Guild guild) Deprecated.for removal in the future, in favour ofGuildManager.deleteGuild(FunnyGuilds, Guild)static GuildDeprecated.for removal in the future, in favour ofGuildManager.findByName(String)static GuildDeprecated.for removal in the future, in favour ofGuildManager.findByTag(String)static GuildDeprecated.for removal in the future, in favour ofGuildManager.findByUuid(UUID)Deprecated.for removal in the future, in favour ofGuildManager.getGuilds()getGuilds(Collection<String> names) Deprecated.for removal in the future, in favour ofGuildManager.findByNames(Collection)getTags(Collection<Guild> guilds) Gets the set of guild tags from collection of guild.static booleannameExists(String name) Deprecated.for removal in the future, in favour ofGuildManager.nameExists(String)static voidremoveGuild(Guild guild) Deprecated.for removal in the future, in favour ofGuildManager.removeGuild(Guild)static booleanDeprecated.for removal in the future, in favour ofGuildManager.nameExists(String)static booleanvalidateName(PluginConfiguration pluginConfiguration, String guildName) Validate guild name.static booleanvalidateTag(PluginConfiguration pluginConfiguration, String guildTag) Validate guild tag.
-
Method Details
-
countGuilds
Deprecated. -
getGuilds
Deprecated.for removal in the future, in favour ofGuildManager.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 ofGuildManager.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 ofGuildManager.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 ofGuildManager.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 ofGuildManager.findByTag(String)Gets the guild.- Parameters:
tag- the tag of guild- Returns:
- the guild
-
nameExists
Deprecated.for removal in the future, in favour ofGuildManager.nameExists(String)Check if guild name is taken.- Parameters:
name- the name to check- Returns:
- the result
-
tagExists
Deprecated.for removal in the future, in favour ofGuildManager.nameExists(String)Check if guild tag is taken.- Parameters:
tag- the tag to check- Returns:
- the result
-
addGuild
Deprecated.for removal in the future, in favour ofGuildManager.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.for removal in the future, in favour ofGuildManager.removeGuild(Guild)Remove guild from storage. If you think you should use this method you probably shouldn't - instead useGuildManager.deleteGuild(FunnyGuilds, Guild).- Parameters:
guild- guild to remove
-
deleteGuild
Deprecated.for removal in the future, in favour ofGuildManager.deleteGuild(FunnyGuilds, Guild)Delete guild in every possible way.- Parameters:
guild- guild to delete
-
getTags
Gets the set of guild tags from collection of guild.- Parameters:
guilds- collection of users- Returns:
- set of guild tags
-
validateName
Validate guild name.- Parameters:
pluginConfiguration- the PluginConfiguration from which pattern will be usedguildName- guild name to validate- Returns:
- if guild name is valid
-
validateTag
Validate guild tag.- Parameters:
pluginConfiguration- the PluginConfiguration from which pattern will be usedguildTag- guild tag to validate- Returns:
- if guild tag is valid
-
GuildManager.addGuild(Guild)