Enum MessageChannel
- java.lang.Object
-
- java.lang.Enum<MessageChannel>
-
- com.alessiodp.core.common.messaging.MessageChannel
-
- All Implemented Interfaces:
Serializable,Comparable<MessageChannel>
public enum MessageChannel extends Enum<MessageChannel>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BUNGEECORDMAINSUB
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static @Nullable MessageChannelparse(@NotNull String channel)Parse the channel as MessageChannel.static @Nullable MessageChannelparseAsBungeecord(@NotNull String channel, @NotNull ADPPlugin plugin)Parse the Bungeecord channel as MessageChannel.static @Nullable MessageChannelparseAsVelocity(@NotNull String channel, @NotNull ADPPlugin plugin)Parse the Velocity channel as MessageChannel.static MessageChannelvalueOf(String name)Returns the enum constant of this type with the specified name.static MessageChannel[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
MAIN
public static final MessageChannel MAIN
-
SUB
public static final MessageChannel SUB
-
BUNGEECORD
public static final MessageChannel BUNGEECORD
-
-
Method Detail
-
values
public static MessageChannel[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (MessageChannel c : MessageChannel.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MessageChannel valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
parse
@Nullable public static @Nullable MessageChannel parse(@NotNull @NotNull String channel)
Parse the channel as MessageChannel.- Parameters:
channel- the channel to parse- Returns:
- the enum for the channel
-
parseAsBungeecord
@Nullable public static @Nullable MessageChannel parseAsBungeecord(@NotNull @NotNull String channel, @NotNull @NotNull ADPPlugin plugin)
Parse the Bungeecord channel as MessageChannel. The channel uses the syntax "plugin:channel" or "Bungeecord"- Parameters:
channel- the channel to parseplugin- the plugin instance- Returns:
- the enum for the channel
-
parseAsVelocity
@Nullable public static @Nullable MessageChannel parseAsVelocity(@NotNull @NotNull String channel, @NotNull @NotNull ADPPlugin plugin)
Parse the Velocity channel as MessageChannel. The channel uses the syntax "plugin:channel" or "Bungeecord"- Parameters:
channel- the channel to parseplugin- the plugin instance- Returns:
- the enum for the channel
-
-