Class ImmutablePrefixHandler
- java.lang.Object
-
- com.mrivanplays.jdcf.settings.prefix.ImmutablePrefixHandler
-
- All Implemented Interfaces:
PrefixHandler
public final class ImmutablePrefixHandler extends java.lang.Object implements PrefixHandler
Represents a prefix handler with immutable prefix.
-
-
Constructor Summary
Constructors Constructor Description ImmutablePrefixHandler(@NotNull java.lang.String prefix)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull java.lang.String
getDefaultPrefix()
Returns the default command prefix of the bot.@Nullable java.lang.String
getGuildPrefix(long guildId)
Returns the prefix, which belongs to the specified guild id.void
savePrefixes()
Saves the prefixesvoid
setDefaultPrefix(@NotNull java.lang.String defaultPrefix)
Sets a new default prefix of the bot.void
setGuildPrefix(@NotNull java.lang.String prefix, long guildId)
Sets a new guild prefix.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.mrivanplays.jdcf.settings.prefix.PrefixHandler
getPrefix, getPrefix
-
-
-
-
Method Detail
-
getDefaultPrefix
@NotNull public @NotNull java.lang.String getDefaultPrefix()
Description copied from interface:PrefixHandler
Returns the default command prefix of the bot.- Specified by:
getDefaultPrefix
in interfacePrefixHandler
- Returns:
- default prefix
-
setDefaultPrefix
public void setDefaultPrefix(@NotNull @NotNull java.lang.String defaultPrefix)
Description copied from interface:PrefixHandler
Sets a new default prefix of the bot.- Specified by:
setDefaultPrefix
in interfacePrefixHandler
- Parameters:
defaultPrefix
- prefix
-
getGuildPrefix
@Nullable public @Nullable java.lang.String getGuildPrefix(long guildId)
Description copied from interface:PrefixHandler
Returns the prefix, which belongs to the specified guild id.- Specified by:
getGuildPrefix
in interfacePrefixHandler
- Parameters:
guildId
- the guild id- Returns:
- guild prefix
-
setGuildPrefix
public void setGuildPrefix(@NotNull @NotNull java.lang.String prefix, long guildId)
Description copied from interface:PrefixHandler
Sets a new guild prefix.- Specified by:
setGuildPrefix
in interfacePrefixHandler
- Parameters:
prefix
- the prefix you want to setguildId
- the guild id for which you want to set the prefix
-
savePrefixes
public void savePrefixes()
Description copied from interface:PrefixHandler
Saves the prefixes- Specified by:
savePrefixes
in interfacePrefixHandler
-
-